| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1366148 | retarde | Game (IOI14_game) | C++20 | 0 ms | 344 KiB |
#include "game.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> cnt;
int lff = 0;
int N = 0;
void initialize(int N) {
cnt.resize(N);
lff = 0;
}
int hasEdge(int u, int v) {
if (cnt[u] < cnt[v]) swap(u, v);
if (lff != 2) {
cnt[u]++; cnt[v]++;
if (cnt[u] == N - 1) {
return 1;
} else {
return 0;
}
} else {
cnt[u]++; cnt[v]++;
if (cnt[u] == N - 2) {
return 1;
} else {
return 0;
}
}
}
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
