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"
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define pb push_back
#define FIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
using namespace std;
typedef long long ll;
typedef pair <int, int> pii;
const int B = 80, bit = 60;
vector <pii> Alice() {
int w = B*bit;
vector <int> p;
for (int i = 0; i < w; i++) p.pb(i/B);
random_shuffle(all(p));
ll x = setN(w+2);
vector <pii> res;
res = {{w+1, w+2}};
for (int i = 0; i < w; i++) {
if (x & (1LL << p[i])) res.pb({i+1, i+2});
else res.pb({i+1, i+3});
}
return res;
}
#include <bits/stdc++.h>
#include "Bob.h"
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define pb push_back
#define FIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
using namespace std;
typedef long long ll;
typedef pair <int, int> pii;
const int B = 80, bit = 60;
ll Bob(vector <pii> v) {
int w = B*bit;
vector <int> p;
for (int i = 0; i < w; i++) p.pb(i/B);
random_shuffle(all(p));
ll res = 0;
for (auto x : v) {
if (x.F == w+1) continue;
if (x.F+1 == x.S) res |= (1LL << p[x.F-1]);
}
return res;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |