제출 #1210014

#제출 시각아이디문제언어결과실행 시간메모리
1210014PlayVoltzCONSUL (info1cup19_consul)C++20
85 / 100
14 ms408 KiB
#include "grader.h"
#include <bits/stdc++.h>
using namespace std;

void solve(int n){
	int loop=30, ans=-1;
	if (n==50){
		map<int, int> m;
		for (int i=1; i<=n; ++i)++m[kth(i)];
		for (auto [a, b]:m)if (b>n/3)ans=a;
		say_answer(ans);
	}
	while (loop--){
		int temp=kth((rand()+17)%n+1);
		if (cnt(temp)>n/3)ans=temp;
	}
	say_answer(ans);
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...