# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1164051 | Aliyyiakbar | Game (IOI14_game) | C++20 | 1 ms | 1604 KiB |
#include "bits/stdc++.h"
#include "game.h"
using namespace std;
const int sz = 3e5 + 9;
int cnt[sz];
int turn;
int r;
void initialize(int n)
{
memset(cnt, 0, sizeof(cnt));
r = (n * (n - 1)) / 2;
turn = 0;
return;
}
int hasEdge(int u, int v)
{
if (cnt[u] == 2 || cnt[v] == 2)
{
return 1;
}
if (turn == r)
{
return 1;
}
++cnt[u];
++cnt[v];
++turn;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |