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>> tree;
for (int i = 1; i <= x; i++) {
if (i != x) {
tree.push_back({i, x});
}
}
return tree;
}
#include <bits/stdc++.h>
#include "Bob.h"
using namespace std;
long long Bob(vector<pair<int,int>> tree) {
int cnt[5001] = {};
for (auto [u,v] : tree) {
cnt[u]++, cnt[v]++;
}
return max_element(cnt, cnt+5001) - cnt;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |