Submission #992588

#TimeUsernameProblemLanguageResultExecution timeMemory
992588KasymKMagic Show (APIO24_show)C++17
Compilation error
0 ms0 KiB
#include "bits/stdc++.h" #include "Alice.h" using namespace std; vector<pair<int, int>> Alice(){ int x = setN(5000); vector<pair<int, int>> v; for(int i = 1; i <= 5000; ++i) if(i != x) v.push_back({i, x}); return v; }
#include "bits/stdc++.h" #include "Bob.h" using namespace std; int Bob(vector<pair<int, int>> v){ map<int, int> mp; for(auto &i : v) mp[i.second]++; int mx = -1, answer = -1; for(auto &i : v) mx = max(mx, mp[i.second]); for(auto &i : v) if(mx == mp[i.second]){ answer = i.second; break; } return answer; }

Compilation message (stderr)

Bob.cpp:5:5: error: ambiguating new declaration of 'int Bob(std::vector<std::pair<int, int> >)'
    5 | int Bob(vector<pair<int, int>> v){
      |     ^~~
In file included from Bob.cpp:2:
Bob.h:3:11: note: old declaration 'long long int Bob(std::vector<std::pair<int, int> >)'
    3 | long long Bob(std::vector<std::pair<int,int>> V);
      |           ^~~