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 "key.h"
int gv[1010], gvv[1010][1010];
void EnsureKeyInfo(int N) {
int i, j;
for(i=1 ; i<=N ; i++)
{
TakeKey(i); gv[i]=Explore();
}
for(i=1 ; i<=N ; i++)
{
for(j=i+1 ; j<=N ; j++)
{
TakeKey(i); TakeKey(j); gvv[i][j]=Explore(); gvv[j][i]=gvv[i][j];
}
}
for(i=1 ; i<=N ; i++)
{
for(j=1 ; j<=N ; j++)
{
if(j==i) Report(i,i);
if(j==i) continue;
if(gvv[i][j]==gv[i]) Report(i,j);
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |