제출 #51930

#제출 시각아이디문제언어결과실행 시간메모리
51930someone_aaICC (CEOI16_icc)C++17
0 / 100
391 ms780 KiB
#include <bits/stdc++.h> #include "icc.h" using namespace std; /*int query(int a, int b, int x[], int y[]) { cout<<x[0]<<" "<<y[0]<<"\n"; int answ; cin>>answ; return answ; } void setRoad(int x, int y) { cout<<"Road: "<<x<<" "<<y<<"\n"; }*/ void run(int N) { bool road[N+2][N+2]; memset(road, false, sizeof(road)); for(int i=1;i<N-1;i++) { bool found = false; for(int j=1;j<=N;j++) { for(int k=1;k<j;k++) { if(!found) { if(!road[k][j] && j!=k) { int a[] = {j}; int b[] = {k}; bool check = bool(query(1, 1, a, b)); if(check) { road[j][k] = road[k][j] = true; setRoad(k, j); for(int c=1;c<=N;c++) { if(road[c][k]) { road[j][c] = road[c][j] = true; } if(road[j][c]) { road[k][c] = road[c][k] = true; } } found = true; } } } } } } } /*int main() { run(4); }*/
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...