#include "king.h"
long long SendInfo(std::vector<int> W, std::vector<int> C) {
return 0;
}
#include "vassal.h"
#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> C;
int p[200005];
int find(int a){
if(a != p[a]) return p[a] = find(p[a]);
return a;
}
void Init(long long B, std::vector<int> C){
n = C.size();
for(int i = 0; i <= n; i++)
p[i] = i;
::C = C;
return;
}
int Maid(int W){
int a = lower_bound(C.begin(), C.end(), W) - C.begin();
a = find(a);
if(a >= n) return -1;
p[a] = a + 1;
return a;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
876 KB |
Correct |
2 |
Correct |
4 ms |
888 KB |
Correct |
3 |
Correct |
4 ms |
888 KB |
Correct |
4 |
Correct |
4 ms |
888 KB |
Correct |
5 |
Correct |
4 ms |
888 KB |
Correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
40 ms |
3580 KB |
Correct |
2 |
Correct |
71 ms |
5772 KB |
Correct |
3 |
Correct |
76 ms |
9012 KB |
Correct |
4 |
Correct |
78 ms |
8860 KB |
Correct |
5 |
Correct |
78 ms |
8804 KB |
Correct |
6 |
Correct |
78 ms |
8812 KB |
Correct |
7 |
Correct |
77 ms |
8968 KB |
Correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
49 ms |
3540 KB |
Correct |
2 |
Correct |
86 ms |
5896 KB |
Correct |
3 |
Correct |
90 ms |
9044 KB |
Correct |
4 |
Correct |
94 ms |
9096 KB |
Correct |
5 |
Correct |
93 ms |
8848 KB |
Correct |
6 |
Correct |
93 ms |
8856 KB |
Correct |
7 |
Correct |
91 ms |
8440 KB |
Correct |
8 |
Correct |
76 ms |
9028 KB |
Correct |