Submission #980680

#TimeUsernameProblemLanguageResultExecution timeMemory
980680penguin133CONSUL (info1cup19_consul)C++17
85 / 100
11 ms600 KiB
#include <bits/stdc++.h>
using namespace std;
#include "grader.h"
//#define int long long
#define pi pair<int, int>
#define pii pair<int, pi>
#define fi first
#define se second
#ifdef _WIN32
#define getchar_unlocked _getchar_nolock
#endif
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

void solve(int n)
{
    for(int i = 1; i <= 30; i++){
		int res = kth(rng()%n + 1);
		int x = cnt(res);
		if(x > n / 3){
			say_answer(res);
			return;
		}
	}
	say_answer(-1);
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...