답안 #639295

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
639295 2022-09-09T11:09:20 Z LucaLucaM CONSUL (info1cup19_consul) C++17
100 / 100
28 ms 296 KB
#include "grader.h"
#include <bits/stdc++.h>

using namespace std;

void solve(int n)
{
    int Q;

    if (n <= 50)
        Q = 50;
    else
        Q = 60;

    for (int q = 0; q<Q; q+=2)
    {
        int i;
        i = rand();
        i %= n, i++;

        i = kth(i);
        if (cnt(i) > n/3)
        {
            say_answer(i);
            return;
        }
    }

    say_answer(-1);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 9 ms 208 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 208 KB Output is correct
2 Correct 6 ms 208 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 18 ms 288 KB Output is correct
2 Correct 10 ms 208 KB Output is correct
3 Correct 6 ms 288 KB Output is correct
4 Correct 6 ms 296 KB Output is correct
5 Correct 19 ms 292 KB Output is correct
6 Correct 19 ms 208 KB Output is correct
7 Correct 24 ms 292 KB Output is correct
8 Correct 28 ms 296 KB Output is correct
9 Correct 19 ms 288 KB Output is correct
10 Correct 27 ms 292 KB Output is correct
11 Correct 16 ms 288 KB Output is correct
12 Correct 16 ms 208 KB Output is correct
13 Correct 19 ms 292 KB Output is correct
14 Correct 19 ms 208 KB Output is correct