Submission #1046211

#TimeUsernameProblemLanguageResultExecution timeMemory
1046211TobMagic Show (APIO24_show)C++17
0 / 100
3 ms1844 KiB
#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, seed = 12345; vector <pii> Alice() { int w = B*bit; ll x = setN(w+2); vector <pii> res; mt19937 rng(seed); vector <int> p; for (int i = 0; i < w; i++) p.pb(i/B); shuffle(all(p), rng); vector <int> q(w+2); for (int i = 0; i < w+2; i++) q[i] = i; shuffle(all(q), rng); res.pb({q[w]+1, q[w+1]+1}); for (int i = 0; i < w; i++) { if (x & (1LL << p[i])) res.pb({q[i]+1, q[i+1]+1}); else res.pb({q[i]+1, q[i+2]+1}); } 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, seed = 12345; ll Bob(vector <pii> v) { int w = B*bit; mt19937 rng(seed); vector <int> p; for (int i = 0; i < w; i++) p.pb(i/B); shuffle(all(p), rng); vector <int> q(w); for (int i = 0; i < w; i++) q[i] = i; shuffle(all(q), rng); map <pii, int> m; for (auto x : v) m[x] = 1; ll res = 0; for (int i = 0; i < w; i++) { if (m[{q[i]+1, q[i+1]+1}]) res |= (1LL << p[i]); } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...