# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1017776 | MohamedFaresNebili | Magic Show (APIO24_show) | C++17 | 3 ms | 832 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() {
long long X = setN(5000);
vector<pair<int, int>> G;
for(int l = 1; l <= 5000; l++) {
if(l == X) continue;
G.push_back({X, l});
}
return G;
}
#include <bits/stdc++.h>
#include "Bob.h"
using namespace std;
long long Bob(vector<pair<int, int>> V) {
vector<int> occ(5001, 0);
for(int l = 0; l < V.size(); l++) {
int X = V[l].first, Y = V[l].second;
occ[X]++, occ[Y]++;
if(occ[X] > occ[Y]) swap(X, Y);
if(occ[Y] > 1) return Y;
}
return -1;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |