Submission #364130

#TimeUsernameProblemLanguageResultExecution timeMemory
364130yasseenkamelCONSUL (info1cup19_consul)C++14
0 / 100
4 ms364 KiB
#include <bits/stdc++.h> #include "grader.h" //#include "grader.cpp" using namespace std; void solve(int n){ int a[1005]; for(int i = 0 ; i < n / 3 ; i ++){ int x = kth(i + 1); a[i] = x; } sort(a,a + n); //int cnt = 1; for(int i = 0 ; i < n / 3 ; i ++){ int x = cnt(a[i]); if(x > n / 3){ say_answer(a[i]); return; } } say_answer(-1); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...