Submission #149853

# Submission time Handle Problem Language Result Execution time Memory
149853 2019-09-01T07:17:16 Z GucciBelt(#3697, PeppaPig, win11905, DodgeBallMan) King of Chairs (FXCUP4_chairs) C++17
100 / 100
160 ms 10444 KB
#include "king.h"
#include <bits/stdc++.h>

#define long long long

using namespace std;

long SendInfo(vector<int> W, vector<int> C) {
	return 0;
}
#include "vassal.h"
#include <bits/stdc++.h>

#define long long long
#define pii pair<int, int>
#define x first
#define y second

using namespace std;

set<pii> S;

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

int Maid(int W){
	auto it = S.lower_bound(pii(W, -1));
	if(it == S.end()) return -1;
	else {
		int ret = it->y;
		S.erase(it);
		return ret;
	}
}

Compilation message

vassal.cpp: In function 'void Init(long long int, std::vector<int>)':
vassal.cpp:14:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0; i < C.size(); i++) S.emplace(C[i], i);
                 ~~^~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 10 ms 1044 KB Correct
2 Correct 10 ms 1044 KB Correct
3 Correct 10 ms 1044 KB Correct
4 Correct 10 ms 1040 KB Correct
5 Correct 10 ms 1048 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 60 ms 5940 KB Correct
2 Correct 112 ms 9624 KB Correct
3 Correct 112 ms 10436 KB Correct
4 Correct 114 ms 10432 KB Correct
5 Correct 119 ms 10428 KB Correct
6 Correct 113 ms 10436 KB Correct
7 Correct 113 ms 10432 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 84 ms 5932 KB Correct
2 Correct 141 ms 9636 KB Correct
3 Correct 134 ms 10444 KB Correct
4 Correct 160 ms 10440 KB Correct
5 Correct 153 ms 10432 KB Correct
6 Correct 159 ms 10436 KB Correct
7 Correct 133 ms 10440 KB Correct
8 Correct 124 ms 10436 KB Correct