Submission #777162

# Submission time Handle Problem Language Result Execution time Memory
777162 2023-07-08T18:16:36 Z LeaRouse CONSUL (info1cup19_consul) C++14
Compilation error
0 ms 0 KB
#include "grader.cpp"
#include    <map>
#define ll long long
using namespace std;
map<ll,int>m;
void solve(int n){
    for(int i=1;i<=n;i++){
        int a=kth(i);
        m[a]++;
    }
    for(auto it:m){
        if(it.second>(n/3)){
            m.clear();
            say_answer(it.first);
            return;
        }
    }
    m.clear();
    say_answer(-1); 
}

Compilation message

/usr/bin/ld: /tmp/cc37PUc4.o: in function `kth(int)':
grader.cpp:(.text+0x0): multiple definition of `kth(int)'; /tmp/ccc0elH1.o:consul.cpp:(.text+0x1d0): first defined here
/usr/bin/ld: /tmp/cc37PUc4.o: in function `cnt(int)':
grader.cpp:(.text+0xb0): multiple definition of `cnt(int)'; /tmp/ccc0elH1.o:consul.cpp:(.text+0x280): first defined here
/usr/bin/ld: /tmp/cc37PUc4.o: in function `say_answer(int)':
grader.cpp:(.text+0x160): multiple definition of `say_answer(int)'; /tmp/ccc0elH1.o:consul.cpp:(.text+0x330): first defined here
/usr/bin/ld: /tmp/cc37PUc4.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccc0elH1.o:consul.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status