# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
208636 | eriksuenderhauf | Data Transfer (IOI19_transfer) | C++14 | 279 ms | 2664 KiB |
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 "transfer.h"
#define vi vector<int>
#define pb push_back
using namespace std;
vi get_attachment(vi source) {
int n = source.size();
vi ret;
int xo = 0;
for (int i = 0; i < n; i++)
xo ^= source[i];
ret.pb(xo);
for (int i = 0; (1 << i) < n; i++) {
xo = 0;
for (int j = 0; j < n; j++)
if ((j+1) & (1 << i))
xo ^= source[j];
ret.pb(xo);
}
return ret;
}
vi retrieve(vi data) {
int n = data.size() < 255 ? 63 : 255;
vi ret;
int xo = 0;
for (int i = 0; i < n; i++)
xo ^= data[i];
ret.pb(xo);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |