#include "king.h"
long long SendInfo(std::vector<int> W, std::vector<int> C) {
return 0ll;
}
#include "vassal.h"
#include<algorithm>
#include<set>
using namespace std;
set<int>Set;
long long BB, w[101000];
int n;
void Init(long long B, std::vector<int> C){
BB = B;
n = C.size();
int i;
for (i = 1; i <= n; i++) {
w[i] = C[i - 1];
Set.insert(i);
}
}
int Maid(int W){
int pv = lower_bound(w + 1, w + n + 1, W) - w;
auto it = Set.lower_bound(pv);
if (it == Set.end())return -1;
int t = *it;
Set.erase(it);
return t - 1;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
764 KB |
Correct |
2 |
Correct |
4 ms |
788 KB |
Correct |
3 |
Correct |
4 ms |
764 KB |
Correct |
4 |
Correct |
4 ms |
764 KB |
Correct |
5 |
Correct |
4 ms |
644 KB |
Correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
57 ms |
7360 KB |
Correct |
2 |
Correct |
104 ms |
12692 KB |
Correct |
3 |
Correct |
122 ms |
13748 KB |
Correct |
4 |
Correct |
114 ms |
13756 KB |
Correct |
5 |
Correct |
112 ms |
13556 KB |
Correct |
6 |
Correct |
112 ms |
13556 KB |
Correct |
7 |
Correct |
112 ms |
13596 KB |
Correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
83 ms |
7400 KB |
Correct |
2 |
Correct |
161 ms |
12828 KB |
Correct |
3 |
Correct |
150 ms |
13588 KB |
Correct |
4 |
Correct |
187 ms |
13912 KB |
Correct |
5 |
Correct |
174 ms |
13776 KB |
Correct |
6 |
Correct |
172 ms |
13600 KB |
Correct |
7 |
Correct |
164 ms |
13684 KB |
Correct |
8 |
Correct |
127 ms |
13880 KB |
Correct |