#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#define range(v,l,r) v.begin()+l,v.begin()+r
typedef vector<int> vi;
vi get_attachment(vi source){
int n=source.size(),k=(n>200 ? 8:6);
vi v(k+1,0);
rep(i,n) rep(j,k) if((i+1)&(1<<j)) v[j]^=source[i];
rep(i,n) v[k]^=source[i];
return v;
}
vi retrieve(vi data){
int n=(data.size()>200 ? 255:63),
k=(n==255?8:6);
vi v(k,0);
rep(i,n) rep(j,k) if((i+1)&(1<<j)) v[j]^=data[i];
int x=0;
rep(i,n) x^=data[i];
if(x!=data[n+k] and v!=vi(range(data,n,n+k))){
x=0;
rep(i,k) if(v[i]^data[i+n]) x^=(1<<i);
data[--x]^=1;
}
return vi(range(data,0,n));
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
788 KB |
Output is correct |
2 |
Correct |
3 ms |
796 KB |
Output is correct |
3 |
Correct |
3 ms |
796 KB |
Output is correct |
4 |
Correct |
3 ms |
788 KB |
Output is correct |
5 |
Correct |
4 ms |
788 KB |
Output is correct |
6 |
Correct |
2 ms |
1000 KB |
Output is correct |
7 |
Correct |
3 ms |
796 KB |
Output is correct |
8 |
Correct |
3 ms |
780 KB |
Output is correct |
9 |
Correct |
2 ms |
996 KB |
Output is correct |
10 |
Correct |
2 ms |
1004 KB |
Output is correct |
11 |
Correct |
3 ms |
796 KB |
Output is correct |
12 |
Correct |
2 ms |
788 KB |
Output is correct |
13 |
Correct |
3 ms |
796 KB |
Output is correct |
14 |
Correct |
2 ms |
796 KB |
Output is correct |
15 |
Correct |
2 ms |
796 KB |
Output is correct |
16 |
Correct |
2 ms |
960 KB |
Output is correct |
17 |
Correct |
3 ms |
796 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
189 ms |
2508 KB |
Output is correct |
2 |
Correct |
181 ms |
2516 KB |
Output is correct |
3 |
Correct |
176 ms |
2512 KB |
Output is correct |
4 |
Correct |
176 ms |
2508 KB |
Output is correct |
5 |
Correct |
181 ms |
2500 KB |
Output is correct |
6 |
Correct |
175 ms |
2504 KB |
Output is correct |
7 |
Correct |
175 ms |
2512 KB |
Output is correct |
8 |
Correct |
179 ms |
2504 KB |
Output is correct |
9 |
Correct |
175 ms |
2512 KB |
Output is correct |
10 |
Correct |
175 ms |
2756 KB |
Output is correct |
11 |
Correct |
179 ms |
2500 KB |
Output is correct |
12 |
Correct |
175 ms |
2508 KB |
Output is correct |
13 |
Correct |
175 ms |
2512 KB |
Output is correct |
14 |
Correct |
175 ms |
2496 KB |
Output is correct |
15 |
Correct |
176 ms |
2516 KB |
Output is correct |
16 |
Correct |
177 ms |
2496 KB |
Output is correct |
17 |
Correct |
178 ms |
2512 KB |
Output is correct |
18 |
Correct |
177 ms |
2516 KB |
Output is correct |
19 |
Correct |
176 ms |
2512 KB |
Output is correct |