Submission #693106

#TimeUsernameProblemLanguageResultExecution timeMemory
693106auslanderCONSUL (info1cup19_consul)C++17
0 / 100
35 ms304 KiB
#include "grader.h" #include <map> using namespace std; map<int, int>mp; void solve(int n) { int i; int k = 60; if (n <= 50) k = 50; for (i = 1; i <= n; i++) { int k = kth(i); if (mp[k] == 0) mp[k] = cnt(k); if (mp[k] > n / 3) { say_answer(k); return; } } say_answer(-1); }

Compilation message (stderr)

consul.cpp: In function 'void solve(int)':
consul.cpp:10:6: warning: variable 'k' set but not used [-Wunused-but-set-variable]
   10 |  int k = 60;
      |      ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...