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 "island.h"
#include <bits/stdc++.h>
using namespace std;
void solve(int N, int L){
int n=N;
vector<vector<int>>is(n+1,vector<int>(n+1,0));
for(int i=1;i<=n;i++)
{
vector<int>V;
for(int j=1;j<n;j++)
{
int k=query(i,j);
if(k>i) break;
bool ok=1;
for(auto x:V) if(is[x][k]) ok=0;
if(!ok) break;
answer(i,k);
is[i][k]=1;
is[k][i]=1;
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |