#include "lokahia.h"
#include <bits/stdc++.h>
using namespace std;
template<class T, class U>
void ckmin(T &a, U b)
{
if (a > b) a = b;
}
template<class T, class U>
void ckmax(T &a, U b)
{
if (a < b) a = b;
}
#define MP make_pair
#define PB push_back
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
#define SZ(x) ((int) (x).size())
#define ALL(x) (x).begin(), (x).end()
#define FOR(i, a, b) for (auto i = (a); i < (b); i++)
#define FORD(i, a, b) for (auto i = (a) - 1; i >= (b); i--)
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<pii> vpi;
typedef vector<pll> vpl;
int FindBase(int N)
{
return -1;
int maj = -1, cnt = 0;
FOR(i, 0, N - 1)
{
if (cnt == 0)
{
maj = i;
cnt++;
}
else
{
int w = CollectRelics(maj, i);
if (w == -1)
{
cnt--;
}
else
{
cnt++;
}
}
}
if (cnt == 0) maj = N - 1;
cnt = 1;
int res = -1;
FOR(i, 0, N)
{
if (i == maj) continue;
int w = CollectRelics(maj, i);
if (w != -1)
{
cnt++;
res = w;
}
}
return ((cnt > N / 2) ? res : -1);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
640 KB |
Correct : C = 0 |
2 |
Incorrect |
6 ms |
640 KB |
Wrong |
3 |
Correct |
5 ms |
512 KB |
Correct : C = 0 |
4 |
Incorrect |
5 ms |
640 KB |
Wrong |
5 |
Incorrect |
5 ms |
512 KB |
Wrong |
6 |
Incorrect |
5 ms |
768 KB |
Wrong |
7 |
Correct |
5 ms |
512 KB |
Correct : C = 0 |
8 |
Correct |
5 ms |
640 KB |
Correct : C = 0 |
9 |
Correct |
5 ms |
640 KB |
Correct : C = 0 |
10 |
Incorrect |
5 ms |
512 KB |
Wrong |
11 |
Correct |
5 ms |
640 KB |
Correct : C = 0 |
12 |
Incorrect |
5 ms |
512 KB |
Wrong |
13 |
Correct |
5 ms |
640 KB |
Correct : C = 0 |
14 |
Correct |
5 ms |
640 KB |
Correct : C = 0 |
15 |
Incorrect |
5 ms |
640 KB |
Wrong |
16 |
Incorrect |
5 ms |
640 KB |
Wrong |
17 |
Incorrect |
5 ms |
512 KB |
Wrong |
18 |
Correct |
5 ms |
640 KB |
Correct : C = 0 |
19 |
Incorrect |
5 ms |
512 KB |
Wrong |
20 |
Incorrect |
5 ms |
640 KB |
Wrong |
21 |
Incorrect |
5 ms |
640 KB |
Wrong |
22 |
Correct |
5 ms |
640 KB |
Correct : C = 0 |
23 |
Incorrect |
4 ms |
512 KB |
Wrong |
24 |
Correct |
5 ms |
640 KB |
Correct : C = 0 |
25 |
Incorrect |
5 ms |
640 KB |
Wrong |
26 |
Incorrect |
5 ms |
640 KB |
Wrong |
27 |
Incorrect |
5 ms |
640 KB |
Wrong |