#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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
1056 KB |
Correct |
2 |
Correct |
10 ms |
1056 KB |
Correct |
3 |
Correct |
10 ms |
1060 KB |
Correct |
4 |
Correct |
10 ms |
1052 KB |
Correct |
5 |
Correct |
11 ms |
1056 KB |
Correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
56 ms |
3944 KB |
Correct |
2 |
Correct |
91 ms |
6068 KB |
Correct |
3 |
Correct |
108 ms |
6488 KB |
Correct |
4 |
Correct |
98 ms |
6348 KB |
Correct |
5 |
Correct |
96 ms |
6600 KB |
Correct |
6 |
Correct |
91 ms |
6600 KB |
Correct |
7 |
Correct |
92 ms |
6608 KB |
Correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
63 ms |
3952 KB |
Correct |
2 |
Correct |
100 ms |
6096 KB |
Correct |
3 |
Correct |
102 ms |
6612 KB |
Correct |
4 |
Correct |
110 ms |
6600 KB |
Correct |
5 |
Correct |
106 ms |
6472 KB |
Correct |
6 |
Correct |
113 ms |
6604 KB |
Correct |
7 |
Correct |
105 ms |
6484 KB |
Correct |
8 |
Correct |
89 ms |
6480 KB |
Correct |