# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
339685 | 2020-12-25T23:19:08 Z | ogibogi2004 | Data Transfer (IOI19_transfer) | C++14 | 135 ms | 2852 KB |
#include "transfer.h" #include <bits/stdc++.h> using namespace std; vector<int> get_attachment(vector<int> source) { int xr=0,cnt=0; for(int i=0;i<source.size();i++) { if(source[i]==1)xr^=(i+1),cnt++; } vector<int>k; for(int i=0;i<9;i++) { if(xr&(1<<i))k.push_back(1); else k.push_back(0); } k.push_back(cnt%2); return k; } vector<int> retrieve(vector<int> data) { vector<int>ret; int xr1=0,xr2=0,cnt=0; for(int i=0;i<data.size()-10;i++) { ret.push_back(data[i]); if(data[i]==1) { xr1^=(i+1);cnt++; } } for(int i=data.size()-10;i<data.size()-1;i++) { if(data[i]==1) { xr2|=(1<<(i-data.size()+10)); } } if(cnt%2==data.back()) { return ret; } if((xr1^xr2)==0)return ret; ret[(xr1^xr2)-1]^=1; return ret; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Partially correct | 5 ms | 876 KB | Partially correct |
2 | Partially correct | 7 ms | 880 KB | Partially correct |
3 | Partially correct | 5 ms | 1092 KB | Partially correct |
4 | Partially correct | 5 ms | 880 KB | Partially correct |
5 | Partially correct | 5 ms | 1100 KB | Partially correct |
6 | Partially correct | 5 ms | 880 KB | Partially correct |
7 | Partially correct | 5 ms | 880 KB | Partially correct |
8 | Partially correct | 5 ms | 880 KB | Partially correct |
9 | Partially correct | 5 ms | 1140 KB | Partially correct |
10 | Partially correct | 5 ms | 880 KB | Partially correct |
11 | Partially correct | 5 ms | 880 KB | Partially correct |
12 | Partially correct | 5 ms | 1028 KB | Partially correct |
13 | Partially correct | 7 ms | 1092 KB | Partially correct |
14 | Partially correct | 6 ms | 1112 KB | Partially correct |
15 | Partially correct | 5 ms | 920 KB | Partially correct |
16 | Partially correct | 5 ms | 1048 KB | Partially correct |
17 | Partially correct | 5 ms | 920 KB | Partially correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Partially correct | 117 ms | 2624 KB | Partially correct |
2 | Partially correct | 121 ms | 2608 KB | Partially correct |
3 | Partially correct | 119 ms | 2512 KB | Partially correct |
4 | Partially correct | 126 ms | 2604 KB | Partially correct |
5 | Partially correct | 124 ms | 2468 KB | Partially correct |
6 | Partially correct | 117 ms | 2648 KB | Partially correct |
7 | Partially correct | 119 ms | 2852 KB | Partially correct |
8 | Partially correct | 119 ms | 2640 KB | Partially correct |
9 | Partially correct | 117 ms | 2612 KB | Partially correct |
10 | Partially correct | 115 ms | 2640 KB | Partially correct |
11 | Partially correct | 116 ms | 2596 KB | Partially correct |
12 | Partially correct | 120 ms | 2468 KB | Partially correct |
13 | Partially correct | 119 ms | 2604 KB | Partially correct |
14 | Partially correct | 118 ms | 2604 KB | Partially correct |
15 | Partially correct | 116 ms | 2604 KB | Partially correct |
16 | Partially correct | 118 ms | 2596 KB | Partially correct |
17 | Partially correct | 119 ms | 2656 KB | Partially correct |
18 | Partially correct | 135 ms | 2604 KB | Partially correct |
19 | Partially correct | 117 ms | 2640 KB | Partially correct |