Submission #639106

#TimeUsernameProblemLanguageResultExecution timeMemory
639106LucaLucaMCONSUL (info1cup19_consul)C++17
Compilation error
0 ms0 KiB
#include "grader.h" #include <bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; int Q = 25 + 5*(n > 50); Q = min(Q, n); for (int query = 0; query<Q; query++) { int i; i = chrono::duration_cast<chrono::nanoseconds>(chrono::high_resolution_clock::now().time_since_epoch()).count(); i = abs(i), i %= n, i++; i = kth(i); if (cnt(i) > n/3) { say_answer(i); return; } } say_answer(-1); return 0; }

Compilation message (stderr)

consul.cpp: In function 'void solve()':
consul.cpp:30:12: error: return-statement with a value, in function returning 'void' [-fpermissive]
   30 |     return 0;
      |            ^