Submission #540652

# Submission time Handle Problem Language Result Execution time Memory
540652 2022-03-21T10:34:11 Z Carmel_Ab1 CONSUL (info1cup19_consul) C++17
0 / 100
1 ms 208 KB
#include "grader.h"
#include "bits/stdc++.h"

void solve(int n){
    std::vector<int>ord(n);
    for(int i=0; i<n; i++)
        ord[i]=i+1;

    std::mt19937 rng(std::chrono::steady_clock::now().time_since_epoch().count());
    std::shuffle(ord.begin(),ord.end(),rng);

    for(int i=0; i<std::min(n,30); i++){
        int c=cnt(kth(ord[i]));
        if(c>n/3) {
            say_answer(ord[i]);
            return;
        }
    }
    say_answer(-1);
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Wrong answer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Wrong answer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Wrong answer
2 Halted 0 ms 0 KB -