Submission #148693

# Submission time Handle Problem Language Result Execution time Memory
148693 2019-09-01T04:56:26 Z 강력한 한방 필살기(#3595, gs14004, kriii, OnionPringles) King of Chairs (FXCUP4_chairs) C++17
100 / 100
164 ms 10460 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 10 ms 1056 KB Correct
2 Correct 11 ms 960 KB Correct
3 Correct 11 ms 1056 KB Correct
4 Correct 10 ms 1056 KB Correct
5 Correct 11 ms 544 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 65 ms 5952 KB Correct
2 Correct 111 ms 9632 KB Correct
3 Correct 120 ms 10444 KB Correct
4 Correct 114 ms 10196 KB Correct
5 Correct 121 ms 10460 KB Correct
6 Correct 121 ms 10200 KB Correct
7 Correct 122 ms 10396 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 78 ms 5948 KB Correct
2 Correct 136 ms 9644 KB Correct
3 Correct 138 ms 10456 KB Correct
4 Correct 154 ms 9936 KB Correct
5 Correct 153 ms 10444 KB Correct
6 Correct 164 ms 10444 KB Correct
7 Correct 135 ms 10452 KB Correct
8 Correct 123 ms 10456 KB Correct