Submission #101243

# Submission time Handle Problem Language Result Execution time Memory
101243 2019-03-18T04:17:14 Z errorgorn ICC (CEOI16_icc) C++14
0 / 100
18 ms 640 KB
#include "icc.h"
#include <vector>
#include <unordered_set>
using namespace std;
vector<int> v,u;
unordered_set<int> al[55];
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<v.size();x++) _v[x]=v[x];
                if(query(1,v.size(),_u,_v)==1){
                    if (a==-1) a=x;
                    else b=x;
                }
            }
        }
        al[a].insert(b);
        al[b].insert(a);
        setRoad(a,b);
    }
}

Compilation message

icc.cpp: In function 'void run(int)':
icc.cpp:22:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int x=0;x<v.size();x++) _v[x]=v[x];
                              ~^~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 15 ms 512 KB Ok! 210 queries used.
2 Incorrect 8 ms 512 KB Wrong road!
# Verdict Execution time Memory Grader output
1 Incorrect 18 ms 512 KB Wrong road!
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 512 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 4 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -