| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1294400 | BlockOG | Data Transfer (IOI19_transfer) | C++20 | 251 ms | 1740 KiB |
#include <bits/stdc++.h>
// meeeooowwwww mrrowwww :3
// go play vivid/stasis!! now!!!! https://vividstasis.gay
#define fo(i, a, b) for (auto i = (a); i < (b); i++)
#define of(i, a, b) for (auto i = (b); i-- > (a);)
#define f first
#define s second
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define be(a) a.begin(), a.end()
using namespace std;
int ____init = []{
ios::sync_with_stdio(false);
cin.tie(NULL), cout.tie(NULL);
return 0;
}();
vector<int> get_attachment(vector<int> source) {
vector<int> v = {0};
for (int i : source) {
while (__builtin_popcount(v.size()) == 1) v.pb(0);
v.pb(i);
}
vector<int> res;
for (int i = 1; i < v.size(); i *= 2) {
int k = 0;
fo(j, 0, v.size()) if (j & i) k ^= v[j];
res.pb(k);
}
return res;
}
vector<int> retrieve(vector<int> data) {
vector<int> v = {0};
if (data.size() < 255) {
int j = 63;
fo(i, 0, 63) {
while (__builtin_popcount(v.size()) == 1) v.pb(data[j++]);
v.pb(data[i]);
}
} else {
int j = 255;
fo(i, 0, 255) {
while (__builtin_popcount(v.size()) == 1) v.pb(data[j++]);
v.pb(data[i]);
}
}
int ci = 0;
for (int i = 1; i < v.size(); i *= 2) {
int k = 0;
fo(j, 0, v.size()) if (j & i) k ^= v[j];
ci |= i * k;
}
v[ci] ^= 1;
vector<int> res;
fo(i, 1, v.size()) if (__builtin_popcount(i) != 1) res.pb(v[i]);
return res;
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
