# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
992588 | KasymK | Magic Show (APIO24_show) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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;
}