| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 701394 | mychecksedad | Game (IOI14_game) | C++17 | 1 ms | 312 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include <game.h>
using namespace std;
int r, n;
vector<int> a;
vector<bool> c;
void initialize(int nn){
r = nn;
n = nn;
a.resize(n, n - 1);
c.resize(n, 0);
}
int hasEdge(int u, int v){
a[u]--, a[v]--;
if(r <= n - 2){
if(a[u] == 2 || a[v] == 2){
if(!c[u]) r--;
if(!c[v]) r--;
c[u] = c[v] = 1;
return 1;
}
}else{
if(a[u] == 1 || a[v] == 1){
if(!c[u]) r--;
if(!c[v]) r--;
c[u] = c[v] = 1;
return 1;
}
}
return 0;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
