#include <bits/stdc++.h>
using namespace std;
#include "lokahia.h"
int FindBase(int N){
int cur = 0;
for (int i = 0; i < N; i++){
if (cur == i) continue;
int q = CollectRelics(cur,i);
if (q != -1 && q > cur) cur = q;
}
int ct = 0;
for (int i = 0; i < N; i++){
if (i == cur || CollectRelics(i,cur) != -1) ct++;
}
if (ct > N/2) return cur;
else return -1;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
5 ms |
640 KB |
Partially correct : C = 395 |
2 |
Correct |
5 ms |
512 KB |
Correct : C = 237 |
3 |
Correct |
5 ms |
512 KB |
Correct : C = 235 |
4 |
Partially correct |
5 ms |
640 KB |
Partially correct : C = 395 |
5 |
Correct |
5 ms |
512 KB |
Correct : C = 235 |
6 |
Correct |
4 ms |
512 KB |
Correct : C = 0 |
7 |
Correct |
5 ms |
512 KB |
Correct : C = 238 |
8 |
Correct |
5 ms |
512 KB |
Correct : C = 8 |
9 |
Correct |
5 ms |
640 KB |
Correct : C = 237 |
10 |
Incorrect |
5 ms |
640 KB |
Wrong |
11 |
Correct |
5 ms |
640 KB |
Correct : C = 235 |
12 |
Partially correct |
5 ms |
640 KB |
Partially correct : C = 397 |
13 |
Partially correct |
5 ms |
640 KB |
Partially correct : C = 395 |
14 |
Partially correct |
5 ms |
640 KB |
Partially correct : C = 397 |
15 |
Partially correct |
6 ms |
640 KB |
Partially correct : C = 398 |
16 |
Partially correct |
5 ms |
640 KB |
Partially correct : C = 397 |
17 |
Incorrect |
5 ms |
640 KB |
Wrong |
18 |
Partially correct |
6 ms |
640 KB |
Partially correct : C = 398 |
19 |
Correct |
5 ms |
768 KB |
Correct : C = 238 |
20 |
Partially correct |
5 ms |
640 KB |
Partially correct : C = 397 |
21 |
Partially correct |
6 ms |
640 KB |
Partially correct : C = 397 |
22 |
Partially correct |
5 ms |
640 KB |
Partially correct : C = 397 |
23 |
Correct |
5 ms |
512 KB |
Correct : C = 236 |
24 |
Correct |
5 ms |
512 KB |
Correct : C = 237 |
25 |
Partially correct |
5 ms |
640 KB |
Partially correct : C = 396 |
26 |
Partially correct |
5 ms |
640 KB |
Partially correct : C = 395 |
27 |
Correct |
5 ms |
512 KB |
Correct : C = 236 |