| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1356816 | orgiloogii | Magic Show (APIO24_show) | C++20 | 2 ms | 1092 KiB |
#include <vector>
#include <bits/stdc++.h>
#include "Alice.h"
using namespace std;
vector<pair<int,int>> Alice(){
long long x = setN(5000);
vector <pair <int, int>> adj;
for (long long i = 1;i <= 5000;i++) {
if (i == x) continue;
adj.push_back({min(i, x), max(i, x)});
}
return adj;
}
#include <vector>
#include <bits/stdc++.h>
#include "Bob.h"
using namespace std;
long long Bob(vector<pair<int,int>> v){
map <int, int> cnt;
for (auto [x, y] : v) {
cnt[x]++;
cnt[y]++;
if (cnt[x] > 1) return x;
else if (cnt[y] > 1) return y;
}
}
Compilation message (stderr)
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
