Submission #1062205

#TimeUsernameProblemLanguageResultExecution timeMemory
1062205peraCONSUL (info1cup19_consul)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "grader.h" using namespace std; int solve(int n){ srand(time(0)); vector<int> a(n + 1); for(int x = 1;x <= 30;x ++){ int u = rand() % n + 1; if(a[u]){ continue; } if(cnt(a[u] = kth(u)) > n / 3){ return a[u]; } } return -1; }

Compilation message (stderr)

consul.cpp:4:5: error: ambiguating new declaration of 'int solve(int)'
    4 | int solve(int n){
      |     ^~~~~
In file included from consul.cpp:2:
grader.h:5:6: note: old declaration 'void solve(int)'
    5 | void solve(int n);
      |      ^~~~~