제출 #980681

#제출 시각아이디문제언어결과실행 시간메모리
980681penguin133CONSUL (info1cup19_consul)C++17
100 / 100
11 ms596 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)
{
  	int lim = (n <= 50 ? 25 : 30);
    for(int i = 1; i <= lim; 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...