Submission #369382

# Submission time Handle Problem Language Result Execution time Memory
369382 2021-02-21T13:42:21 Z doowey CONSUL (info1cup19_consul) C++14
5.98612 / 100
49 ms 492 KB
#include <bits/stdc++.h>
#include "grader.h"

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;

#define fi first
#define se second
#define mp make_pair


void solve(int n)
{
    vector<int> xa(n);
    for(int i = 0 ;i < n; i ++ ){
        xa[i]=i+1;
    }
    random_shuffle(xa.begin(), xa.end());
    int cur;
    int Q = 0;
    for(int i = 0 ; i < n; i ++ ){
        if(Q <= 48){
            cur = kth(xa[i]);
            Q ++ ;
            if(cnt(cur) > n/3){
                say_answer(cur);
                return;
            }
        }

    }
    say_answer(-1);
}
# Verdict Execution time Memory Grader output
1 Incorrect 21 ms 364 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Partially correct 42 ms 364 KB Output is partially correct
2 Correct 10 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Partially correct 29 ms 492 KB Output is partially correct
2 Partially correct 49 ms 364 KB Output is partially correct
3 Correct 11 ms 364 KB Output is correct
4 Correct 11 ms 364 KB Output is correct
5 Partially correct 31 ms 364 KB Output is partially correct
6 Partially correct 32 ms 364 KB Output is partially correct
7 Partially correct 44 ms 364 KB Output is partially correct
8 Partially correct 46 ms 364 KB Output is partially correct
9 Partially correct 30 ms 364 KB Output is partially correct
10 Partially correct 29 ms 364 KB Output is partially correct
11 Partially correct 40 ms 364 KB Output is partially correct
12 Partially correct 29 ms 364 KB Output is partially correct
13 Partially correct 44 ms 364 KB Output is partially correct
14 Partially correct 45 ms 364 KB Output is partially correct