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 "game.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 1505;
int cont[N];
int neg = 0;
int queries = 0;
void initialize(int n) {
memset(cont, 0, sizeof cont);
neg = 0;
return;
}
int hasEdge(int u, int v) {
queries++;
if(cont[u] == 2 or cont[v] == 2){
// must be positive
return 1;
}
if(neg == 3){
// must be positive
return 1;
}
if(queries == 6){
// es la ultima
// quiero probar si aca ya podria contestar lo que me de la gana
// o sea no estoy forzado a que el grafo este conectado.
return 0;
}
cont[u]++;
cont[v]++;
neg++;
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... |