| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1366164 | retarde | Game (IOI14_game) | C++20 | 0 ms | 344 KiB |
#include "game.h"
#include <bits/stdc++.h>
using namespace std;
vector<set<int>> cands;
vector<int> need;
int N = 0;
void initialize(int n) {
N = n;
cands.assign(N, {});
need.assign(N, 2);
need[0] = need[N - 1] = 1;
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
if (i != j) cands[i].insert(j);
}
}
}
int hasEdge(int u, int v) {
if ((int)cands[u].size() > need[u] && (int)cands[v].size() > need[v]) {
cands[u].erase(v);
cands[v].erase(u);
return 0;
}
return 1;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
