답안 #101254

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
101254 2019-03-18T04:53:24 Z errorgorn CEOI16_icc (CEOI16_icc) C++14
0 / 100
293 ms 604 KB
#include "icc.h"
#include <vector>
#include <unordered_set>
using namespace std;
vector<int> v,u;
unordered_set<int> al[105];
void run(int n) {
    u.push_back(0);
    int a,b;
    for (int x=1;x<=n;x++) al[x].insert(x);
    for (int _x=1;_x<n;_x++){
        a=-1,b=-1;
        while (b==-1){
            for (int x=1;x<=n;x++){
                u[0]=x;
                v.clear();
                for (int y=1;y<=n;y++){
                    if (al[x].count(y)==0) v.push_back(y);
                }
                int _u[]={u[0]};
                int _v[v.size()];
                for (int x=0;x<(int)v.size();x++) _v[x]=v[x];
                if(query(1,v.size(),_u,_v)==1){
                    if (a==-1) a=x;
                    else b=x;
                }
            }
        }
        printf("%d %d\n",a,b);
        al[a].insert(b);
        al[b].insert(a);
        int aa[]={a},bb[]={b};
        if (query(1,1,aa,bb))setRoad(a,b);
      	else exit(1);
    }
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 20 ms 512 KB Program is not terminated properly.
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 35 ms 512 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 76 ms 604 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 41 ms 512 KB Program is not terminated properly.
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 32 ms 512 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 293 ms 576 KB Program is not terminated properly.
2 Halted 0 ms 0 KB -