Submission #150889

# Submission time Handle Problem Language Result Execution time Memory
150889 2019-09-01T10:00:16 Z kriii King of Chairs (FXCUP4_chairs) C++17
100 / 100
152 ms 13052 KB
#include "king.h"

long long SendInfo(std::vector<int> W, std::vector<int> C) {
	return 0;
}
#include "vassal.h"
#include <set>
using namespace std;

set<pair<int, int> > c;

void Init(long long B, std::vector<int> C){
	for (int i = 0; i < C.size(); i++){
		c.insert({ C[i],i });
	}
}

int Maid(int W){
	auto I = c.lower_bound(make_pair(W, 0));
	if (I == c.end()) return -1;
	int r = I->second;
	c.erase(I);
	return r;
}

Compilation message

vassal.cpp: In function 'void Init(long long int, std::vector<int>)':
vassal.cpp:8:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < C.size(); i++){
                  ~~^~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 4 ms 644 KB Correct
2 Correct 4 ms 764 KB Correct
3 Correct 4 ms 636 KB Correct
4 Correct 4 ms 760 KB Correct
5 Correct 4 ms 636 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 55 ms 6844 KB Correct
2 Correct 99 ms 12028 KB Correct
3 Correct 107 ms 12816 KB Correct
4 Correct 111 ms 12776 KB Correct
5 Correct 108 ms 12916 KB Correct
6 Correct 110 ms 13052 KB Correct
7 Correct 107 ms 12840 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 73 ms 7020 KB Correct
2 Correct 134 ms 11940 KB Correct
3 Correct 132 ms 12864 KB Correct
4 Correct 148 ms 12812 KB Correct
5 Correct 152 ms 13036 KB Correct
6 Correct 149 ms 12816 KB Correct
7 Correct 127 ms 12808 KB Correct
8 Correct 122 ms 12920 KB Correct