Submission #360233

# Submission time Handle Problem Language Result Execution time Memory
360233 2021-01-27T22:47:05 Z ogibogi2004 CONSUL (info1cup19_consul) C++14
85 / 100
34 ms 364 KB
#include "grader.h"
#include<bits/stdc++.h>
using namespace std;
void solve(int n)
{
    /// insert your code
    /// for example
    set<int>checked;
    srand(23543);
    int cnt1=0;
    for(;cnt1+2<=60;)
    {
		int i=rand()%n+1;
		if(checked.find(i)!=checked.end())continue;
		checked.insert(i);
		cnt1+=2;
		int val=kth(i);
		if(cnt(val)*3>n)
		{
			say_answer(val);
			return;
		}
	}
	say_answer(-1);
	return;
    if(cnt(kth(1)) > n / 3) say_answer(kth(1));
        else say_answer(-1);
}
# Verdict Execution time Memory Grader output
1 Incorrect 8 ms 364 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Correct 19 ms 364 KB Output is correct
2 Correct 8 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 15 ms 364 KB Output is correct
2 Correct 32 ms 364 KB Output is correct
3 Correct 9 ms 364 KB Output is correct
4 Correct 7 ms 364 KB Output is correct
5 Correct 21 ms 364 KB Output is correct
6 Correct 34 ms 364 KB Output is correct
7 Correct 23 ms 256 KB Output is correct
8 Correct 28 ms 364 KB Output is correct
9 Correct 22 ms 364 KB Output is correct
10 Correct 24 ms 364 KB Output is correct
11 Correct 29 ms 364 KB Output is correct
12 Correct 28 ms 364 KB Output is correct
13 Correct 29 ms 364 KB Output is correct
14 Correct 32 ms 364 KB Output is correct