Submission #869775

# Submission time Handle Problem Language Result Execution time Memory
869775 2023-11-05T15:42:54 Z gutzzy ICC (CEOI16_icc) C++14
7 / 100
227 ms 616 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+1,road.second+1);
        lst[road.first][road.second] = true;
        lst[road.second][road.first] = true;
        roads++;
    }
}
# Verdict Execution time Memory Grader output
1 Correct 35 ms 600 KB Ok! 1015 queries used.
2 Correct 35 ms 604 KB Ok! 1010 queries used.
# Verdict Execution time Memory Grader output
1 Incorrect 191 ms 600 KB Number of queries more than 5000 out of 2500
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 227 ms 612 KB Number of queries more than 4500 out of 2250
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 197 ms 600 KB Number of queries more than 4000 out of 2000
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 175 ms 604 KB Number of queries more than 3550 out of 1775
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 169 ms 616 KB Number of queries more than 3250 out of 1625
2 Halted 0 ms 0 KB -