Submission #605146

# Submission time Handle Problem Language Result Execution time Memory
605146 2022-07-25T13:22:37 Z pawned ICC (CEOI16_icc) C++17
0 / 100
366 ms 508 KB
#include "icc.h"

#include <bits/stdc++.h>
using namespace std;

#define fi first
#define se second
#define pb push_back
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;

bool adj[101][101];

bool tc(int a, int b, vi va, vi vb) {
    int query1[a];
    for (int i = 0; i < a; i++) {
        query1[i] = va[i];
    }
    int query2[b];
    for (int i = 0; i < b; i++) {
        query2[i] = vb[i];
    }
    return query(a, b, query1, query2);
}

void run(int n) {
    int N = n;
    for (int i = 0; i < 101; i++) {
        for (int j = 0; j < 101; j++) {
            adj[i][j] = false;
        }
        adj[i][i] = true;
    }
    for (int i = 0; i < N - 1; i++) {
        vi has;
        for (int j = 1; j <= N; j++) {
            vi a;
            a.pb(j);
            vi b;
            for (int k = 1; k <= N; k++) {
                if (j == k)
                    continue;
                if (!adj[j][k])
                    b.pb(k);
            }
            if (b.size() == 0)
                continue;
            bool given = tc(1, b.size(), a, b);
            if (given)
                has.pb(j);
        }
        setRoad(has[0], has[1]);
        adj[has[0]][has[1]] = true;
        adj[has[1]][has[0]] = true;
    }
}
# Verdict Execution time Memory Grader output
1 Correct 10 ms 468 KB Ok! 210 queries used.
2 Incorrect 5 ms 468 KB Wrong road!
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 15 ms 508 KB Wrong road!
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 366 ms 492 KB Wrong road!
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 55 ms 468 KB Wrong road!
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 39 ms 468 KB Wrong road!
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 253 ms 492 KB Number of queries more than 3250 out of 1625
2 Halted 0 ms 0 KB -