Submission #604701

# Submission time Handle Problem Language Result Execution time Memory
604701 2022-07-25T08:53:49 Z snasibov05 ICC (CEOI16_icc) C++14
0 / 100
491 ms 488 KB
#include "icc.h"
#include <bits/stdc++.h>
using namespace std;

void run(int n) {
    int arra[n+1], arrb[n+1];
    vector<vector<bool>> ed(n+1, vector<bool>(n+1));
    for(int i = 0; i < n - 1; i++) {
        int u = -1, v = -1;
        for (int j = 1; j <= n; ++j){

            arra[0] = j;
            int x = 0;
            for (int k = 1; k <= n; ++k){
                if (ed[j][k] || j == k) continue;
                arrb[x++] = k;
            }

            if (query(1, x, arra, arrb)) {
                if (u == -1) u = j;
                else v = j;
            }
        }

        setRoad(u, v);
        ed[u][v] = ed[v][u] = true;

    }
}
# Verdict Execution time Memory Grader output
1 Correct 11 ms 468 KB Ok! 210 queries used.
2 Incorrect 8 ms 468 KB Wrong road!
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 20 ms 476 KB Wrong road!
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 491 ms 488 KB Wrong road!
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 64 ms 468 KB Wrong road!
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 47 ms 484 KB Wrong road!
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 355 ms 480 KB Number of queries more than 3250 out of 1625
2 Halted 0 ms 0 KB -