Submission #170463

# Submission time Handle Problem Language Result Execution time Memory
170463 2019-12-25T11:25:48 Z Mounir CONSUL (info1cup19_consul) C++14
0 / 100
2 ms 376 KB
#include <bits/stdc++.h>
#include "grader.h"
using namespace std;

void solve(int N){
	srand(42);
	
	int tot = 0;
	set<int> faits;
	
	while (tot <= 2*N/3){
		int cur = kth((int)rand()%N);
		if (faits.count(cur) == 0){
		//	cout << cur << endl;
			int nCur = cnt(cur);
			if (nCur >= double(N)/3){
				say_answer(cur);
				return;
			}
			tot += nCur;
			faits.insert(cur);
		}
	}
	say_answer(-1);
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 248 KB Wrong query format.
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 248 KB Wrong answer.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Wrong answer.
2 Halted 0 ms 0 KB -