Submission #1177872

#TimeUsernameProblemLanguageResultExecution timeMemory
1177872adaawfMagic Show (APIO24_show)C++20
0 / 100
1 ms352 KiB
#include <bits/stdc++.h>
#include "Alice.h"
using namespace std;
vector<pair<int, int>> Alice() {
    long long int x = setN(5000);
    int n = 5000;
    vector<pair<int, int>> v;
    v.push_back({1, 2});
    for (int i = 3; i <= n; i++) {
        int h = i % 60;
        if (x & (1ll << h)) {
            v.push_back({1, i});
        }
        else v.push_back({2, i});
    }
    unsigned seed = std::chrono::system_clock::now().time_since_epoch().count();
    shuffle(v.begin(), v.end(), std::default_random_engine(seed));
    return v;
}
#include <bits/stdc++.h>
#include "Bob.h"
using namespace std;
long long int Bob(vector<pair<int, int>> v) {
    long long int res = 0;
    for (auto w : v) {
        if (w.first > w.second) swap(w.first, w.second);
        if (w.second == 2) continue;
        if (w.first & 1) {
            res |= (1ll << (w.second % 60));
        }
    }
    return res;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...