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 <iostream>
using namespace std;
const int MAX_NOEUD = 15e2;
int nbNoeud;
int nbVu[MAX_NOEUD];
bool estConnecte[MAX_NOEUD];
void initialize(int n)
{
nbNoeud = n;
}
int hasEdge(int u, int v)
{
cout << u << " " << v << endl;
nbVu[u]++;
nbVu[v]++;
if(nbVu[u] == nbNoeud - 1)
{
estConnecte[u] = true;
estConnecte[v] = true;
return 1;
}
else if(nbVu[v] == nbNoeud - 1)
{
estConnecte[u] = true;
estConnecte[v] = true;
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... |