Submission #635777

# Submission time Handle Problem Language Result Execution time Memory
635777 2022-08-26T22:20:49 Z Dec0Dedd CONSUL (info1cup19_consul) C++14
0 / 100
1 ms 208 KB
#include <bits/stdc++.h>
#include "grader.h"

using namespace std;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int rnd(int a, int b){ 
	return a+rng()%(b-a+1);
}

void solve(int n) {
   pair<int, int> x={0, -1};
   for (int i=0; i<20; ++i) {
      int r=rnd(1, n);
      x=max(x, {cnt(r), kth(r)});
   }
   if (x.first > n/3) say_answer(x.second);
   else say_answer(-1); 
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Wrong answer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Wrong answer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Wrong answer
2 Halted 0 ms 0 KB -