Submission #364139

#TimeUsernameProblemLanguageResultExecution timeMemory
364139yasseenkamelCONSUL (info1cup19_consul)C++14
85 / 100
37 ms620 KiB
#include <bits/stdc++.h> #include "grader.h" //#include "grader.cpp" using namespace std; map<int,int> vis; void solve(int n){ int a[1005]; for(int i = 0 ; i < 30 ; i ++){ int idx = (rand() % n) + 1; int x = kth(idx); if(!vis[x]){ int y = cnt(x); if(y > n / 3){ say_answer(x); return; } } } //sort(a,a + n); //int cnt = 1; say_answer(-1); }

Compilation message (stderr)

consul.cpp: In function 'void solve(int)':
consul.cpp:10:9: warning: unused variable 'a' [-Wunused-variable]
   10 |     int a[1005];
      |         ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...