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 "Alice.h"
#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> Alice() {
int n = 5000;
long long x = setN(n);
vector<pair<int, int>> edges;
for (int i = 1; i <= n; i++) {
if (i == x) continue;
edges.push_back({x, i});
}
return edges;
}
#include "Bob.h"
#include <bits/stdc++.h>
using namespace std;
long long Bob(vector<pair<int, int>> V) {
int n = 5000;
vector<int> cnt(n + 1);
for (auto [u, v] : V) {
cnt[u]++, cnt[v]++;
}
int mx = 0, ans = -1;
for (int i = 1; i <= n; i++) {
if (cnt[i] > mx) {
mx = cnt[i], ans = i;
}
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |