#include "lokahia.h"
int FindBase(int N) {
return -1;
if (N == 1) return 0;
int cand = (N%2) ? N-1 : -1, k;
for (int i=0; i+1<N; i+=2) if ((k = CollectRelics(i, i+1)) != -1) cand = k;
if (cand == -1) return -1;
int cnt = 1;
for (int i=0; i<N; i++) if (i != cand) cnt += (CollectRelics(cand, i) != -1);
if (cnt > N/2) return cand;
return -1;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
640 KB |
Correct : C = 0 |
2 |
Incorrect |
5 ms |
512 KB |
Wrong |
3 |
Incorrect |
6 ms |
640 KB |
Wrong |
4 |
Incorrect |
6 ms |
640 KB |
Wrong |
5 |
Incorrect |
5 ms |
512 KB |
Wrong |
6 |
Correct |
6 ms |
640 KB |
Correct : C = 0 |
7 |
Incorrect |
6 ms |
512 KB |
Wrong |
8 |
Correct |
6 ms |
640 KB |
Correct : C = 0 |
9 |
Incorrect |
5 ms |
384 KB |
Wrong |
10 |
Incorrect |
6 ms |
640 KB |
Wrong |
11 |
Correct |
5 ms |
512 KB |
Correct : C = 0 |
12 |
Correct |
6 ms |
640 KB |
Correct : C = 0 |
13 |
Correct |
6 ms |
640 KB |
Correct : C = 0 |
14 |
Incorrect |
6 ms |
640 KB |
Wrong |
15 |
Incorrect |
6 ms |
640 KB |
Wrong |
16 |
Incorrect |
6 ms |
640 KB |
Wrong |
17 |
Correct |
6 ms |
512 KB |
Correct : C = 0 |
18 |
Incorrect |
6 ms |
640 KB |
Wrong |
19 |
Incorrect |
5 ms |
512 KB |
Wrong |
20 |
Incorrect |
8 ms |
512 KB |
Wrong |
21 |
Correct |
6 ms |
640 KB |
Correct : C = 0 |
22 |
Correct |
6 ms |
512 KB |
Correct : C = 0 |
23 |
Correct |
6 ms |
512 KB |
Correct : C = 0 |
24 |
Incorrect |
5 ms |
512 KB |
Wrong |
25 |
Incorrect |
7 ms |
640 KB |
Wrong |
26 |
Incorrect |
5 ms |
512 KB |
Wrong |
27 |
Correct |
7 ms |
640 KB |
Correct : C = 0 |