#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;
}
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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
1060 KB |
Correct |
2 |
Runtime error |
10 ms |
532 KB |
Execution failed because the return code was nonzero |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
55 ms |
3964 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
56 ms |
3960 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |