Submission #315055

# Submission time Handle Problem Language Result Execution time Memory
315055 2020-10-22T01:45:23 Z Seanliu CONSUL (info1cup19_consul) C++14
85 / 100
28 ms 288 KB
#include "grader.h"
//#include <iostream>
//using namespace std;
int seed = 101;

inline int rnd(){
	return seed = (seed * 3 + 1) % 0xdefaced;
}

void solve(int N){
	for(int i = 0; i < 30; i++){
		int r = rnd() % N + 1;
		int v = kth(r);
		int c = cnt(v);
		//cout << "loc = " << r << ", val = " << v << ", cnt = " << c << endl;
		if(c > (N / 3)){
			say_answer(v);
			return;
		}
	}
	say_answer(-1);
}
# Verdict Execution time Memory Grader output
1 Incorrect 13 ms 256 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Correct 21 ms 256 KB Output is correct
2 Correct 8 ms 288 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 22 ms 256 KB Output is correct
2 Correct 22 ms 256 KB Output is correct
3 Correct 7 ms 256 KB Output is correct
4 Correct 7 ms 256 KB Output is correct
5 Correct 18 ms 256 KB Output is correct
6 Correct 23 ms 256 KB Output is correct
7 Correct 21 ms 256 KB Output is correct
8 Correct 26 ms 256 KB Output is correct
9 Correct 21 ms 256 KB Output is correct
10 Correct 21 ms 256 KB Output is correct
11 Correct 24 ms 256 KB Output is correct
12 Correct 21 ms 256 KB Output is correct
13 Correct 26 ms 256 KB Output is correct
14 Correct 28 ms 256 KB Output is correct