Submission #522239

#TimeUsernameProblemLanguageResultExecution timeMemory
522239amunduzbaevCostinland (info1cup19_costinland)C++17
Compilation error
0 ms0 KiB
#include "bits/stdc++.h"
using namespace std;
#include "grader.h"

#ifndef EVAL
#include "grader.cpp"
#endif

void solve(int n){
	if(n <= 50){
		map<int, int> mm;
		for(int i=1;i<=n;i++){
			int v = kth(i);
			mm[v]++;
		}
		
		for(auto x : mm){
			if(x.second > n / 3){
				say_answer(x.first);
				return;
			}
		} say_answer(-1);
		return;
	}
	
	for(int i=0;i<30;i++){
		int p = rand() % n + 1;
		int v = kth(p);
		int c = cnt(v);
		if(c > n / 3) { say_answer(v); return; }
	} say_answer(-1); return;
}

Compilation message (stderr)

costinland.cpp:3:10: fatal error: grader.h: No such file or directory
    3 | #include "grader.h"
      |          ^~~~~~~~~~
compilation terminated.