Submission #637599

# Submission time Handle Problem Language Result Execution time Memory
637599 2022-09-02T13:00:39 Z tvladm2009 CONSUL (info1cup19_consul) C++14
12.9608 / 100
45 ms 336 KB
#include <bits/stdc++.h>
#include <grader.h>

using namespace std;

void solve(int n) {
    srand(time(NULL));
    map<int, int> mp;
    for (int i = 1; i <= 50; i++) {
        int x = rand() % n + 1;
        if (mp.find(x) != mp.end()) {
            continue;
        }
        mp[x] = true;
        x = kth(x);
        if (cnt(x) > n / 3) {
            say_answer(x);
            return;
        }
    }
    say_answer(-1);
}
# Verdict Execution time Memory Grader output
1 Incorrect 11 ms 208 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Partially correct 28 ms 208 KB Output is partially correct
2 Correct 8 ms 208 KB Output is correct
# Verdict Execution time Memory Grader output
1 Partially correct 27 ms 208 KB Output is partially correct
2 Partially correct 23 ms 336 KB Output is partially correct
3 Correct 8 ms 208 KB Output is correct
4 Correct 5 ms 208 KB Output is correct
5 Partially correct 25 ms 208 KB Output is partially correct
6 Partially correct 39 ms 208 KB Output is partially correct
7 Partially correct 27 ms 208 KB Output is partially correct
8 Partially correct 45 ms 208 KB Output is partially correct
9 Partially correct 31 ms 208 KB Output is partially correct
10 Partially correct 34 ms 208 KB Output is partially correct
11 Partially correct 28 ms 208 KB Output is partially correct
12 Partially correct 27 ms 208 KB Output is partially correct
13 Partially correct 34 ms 296 KB Output is partially correct
14 Partially correct 36 ms 208 KB Output is partially correct