이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "icc.h"
using namespace std;
typedef pair<int,int> pii;
int N;
map< pii , bool > hasEdge;
void run(int n)
{
N = n;
for(int k = 1 ; k < N ; k++)
{
bool find = false;
int ansA = 0;
int ansB = 0;
for(int i = 1 ; i <= n && !find ; i++)
{
for(int j = i + 1 ; j <= n && !find ; j++)
{
if( hasEdge[ { i , j } ] ) continue;
int A[3] = { i , 0 , 0 };
int B[1] = { j };
int ans = query( 1 , 1 , A , B );
if( ans == 1 )
{
find = true;
ansA = i;
ansB = j;
}
}
}
hasEdge[ { ansA , ansB } ] = true;
setRoad( ansA , ansB );
}
}
# | 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... |