Submission #561366

#TimeUsernameProblemLanguageResultExecution timeMemory
561366mircea_007CONSUL (info1cup19_consul)C++17
0 / 100
12 ms280 KiB
#include <stdio.h> #include <random> #include "grader.h" #define MAXN 1000 #define MAXQ 60 void solve( int N ){ int *viz = new int[N]; std::mt19937 mt( clock() ); int q = MAXQ, i, val; for( ; q-- ; ){ while( viz[i = mt() % N] ); viz[i] = 1; if( cnt( val = kth( i ) ) * 3 > N ){ say_answer( val ); delete viz; return; } } say_answer( -1 ); delete viz; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...