# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1093601 | Irate | Data Transfer (IOI19_transfer) | C++17 | 0 ms | 0 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 "transfer.h"
using namespace std;
vector<int> get_attachment(vector<int> source) {
int n = (int)source.size();
int XOR = 0, cnt = 0;
for(int i = 0;i < n;++i){
if(source[i]){
XOR ^= (i + 1);
cnt++;
}
}
vector<int>res;
if(n > 100){
for(int i = 0;i < 8;++i){
if(XOR & (1 << i)){
res.push_back(1);
}
else{
res.push_back(0);
}
}
}
else{
for(int i = 0;i < 6;++i){
if(XOR & (1 << i)){
res.push_back(1);
}
else{
res.push_back(0);
}