Submission #869774

# Submission time Handle Problem Language Result Execution time Memory
869774 2023-11-05T15:38:57 Z gutzzy ICC (CEOI16_icc) C++14
0 / 100
225 ms 624 KB
#include <bits/stdc++.h>
#include "icc.h"
using namespace std;

vector<vector<bool>> lst;

pair<int,int> guess(int n){
    for(int i=0;i<n;i++){
        for(int j=i+1;j<n;j++){
            if(lst[i][j]==false){
                int a[1] = {i+1};
                int b[1] = {j+1};
                if(query(1,1,a,b)) return {i,j};
            }
        }
    }
    return {0,0};
}

void run(int n){
    int roads = 0;
    lst = vector<vector<bool>>(n,vector<bool>(n, false));
    for(int i=0;i<n;i++) lst[i][i]=true;
    while(roads<n-1){
        pair<int,int> road = guess(n);
        setRoad(road.first,road.second);
        lst[road.first][road.second] = true;
        lst[road.second][road.first] = true;
        roads++;
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 600 KB Wrong road!
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 53 ms 608 KB Wrong road!
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 225 ms 624 KB Number of queries more than 4500 out of 2250
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 195 ms 604 KB Number of queries more than 4000 out of 2000
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 176 ms 612 KB Number of queries more than 3550 out of 1775
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 161 ms 600 KB Number of queries more than 3250 out of 1625
2 Halted 0 ms 0 KB -