Submission #992589

#TimeUsernameProblemLanguageResultExecution timeMemory
992589KasymKMagic 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(){ long long 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; long long 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: In function 'long long int Bob(std::vector<std::pair<int, int> >)':
Bob.cpp:17:16: error: expected ';' before '}' token
   17 |   return answer
      |                ^
      |                ;
   18 | }
      | ~