#include "game.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> cnt;
void initialize(int n) {
cnt = std::vector<int>(n, n-1);
}
int hasEdge(int u, int v) {
if (cnt[u] == 1 || cnt[v] == 1) {
cnt[u] = -1;
cnt[v] = -1;
return 1;
}
cnt[u]--;
cnt[v]--;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
308 KB |
Output is correct |
2 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |