#include <bits/stdc++.h>
using namespace std;
std::vector<int>get_attachment(std::vector<int> source) {
vector<int>ret;
int un=0;
for(auto k:source)
{
if(k==1)
un++;
}
for(auto k:source)
ret.push_back(k);
if(un%2==0)
ret.push_back(0);
else
ret.push_back(1);
return ret;
}
std::vector<int>retrieve(std::vector<int> data) {
int bit, i, un=0;
vector<int>a,b;
bit=data[int(data.size())-1];
data.pop_back();
for(i=0; i<int(data.size())/2; i++)
{
a.push_back(data[i]);
if(data[i]==1)
un++;
}
if(un%2==0&&bit==0)
return a;
else if(un%2==1&&bit==1)
return a;
for(i=int(data.size())/2; i<int(data.size()); i++)
{
b.push_back(data[i]);
}
return b;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
3 ms |
796 KB |
Partially correct |
2 |
Partially correct |
3 ms |
784 KB |
Partially correct |
3 |
Partially correct |
2 ms |
1040 KB |
Partially correct |
4 |
Partially correct |
4 ms |
800 KB |
Partially correct |
5 |
Partially correct |
5 ms |
968 KB |
Partially correct |
6 |
Partially correct |
6 ms |
796 KB |
Partially correct |
7 |
Partially correct |
4 ms |
800 KB |
Partially correct |
8 |
Partially correct |
3 ms |
792 KB |
Partially correct |
9 |
Partially correct |
3 ms |
800 KB |
Partially correct |
10 |
Partially correct |
3 ms |
800 KB |
Partially correct |
11 |
Partially correct |
3 ms |
1044 KB |
Partially correct |
12 |
Partially correct |
3 ms |
800 KB |
Partially correct |
13 |
Partially correct |
3 ms |
1048 KB |
Partially correct |
14 |
Partially correct |
4 ms |
1052 KB |
Partially correct |
15 |
Partially correct |
3 ms |
792 KB |
Partially correct |
16 |
Partially correct |
3 ms |
800 KB |
Partially correct |
17 |
Partially correct |
4 ms |
792 KB |
Partially correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
116 ms |
3076 KB |
Partially correct |
2 |
Partially correct |
116 ms |
3084 KB |
Partially correct |
3 |
Partially correct |
115 ms |
3092 KB |
Partially correct |
4 |
Partially correct |
110 ms |
3092 KB |
Partially correct |
5 |
Partially correct |
107 ms |
3108 KB |
Partially correct |
6 |
Partially correct |
111 ms |
3108 KB |
Partially correct |
7 |
Partially correct |
117 ms |
3128 KB |
Partially correct |
8 |
Partially correct |
117 ms |
3092 KB |
Partially correct |
9 |
Partially correct |
119 ms |
3080 KB |
Partially correct |
10 |
Partially correct |
115 ms |
3076 KB |
Partially correct |
11 |
Partially correct |
113 ms |
3084 KB |
Partially correct |
12 |
Partially correct |
153 ms |
3108 KB |
Partially correct |
13 |
Partially correct |
152 ms |
3092 KB |
Partially correct |
14 |
Partially correct |
119 ms |
3080 KB |
Partially correct |
15 |
Partially correct |
114 ms |
3084 KB |
Partially correct |
16 |
Partially correct |
106 ms |
3172 KB |
Partially correct |
17 |
Partially correct |
142 ms |
3080 KB |
Partially correct |
18 |
Partially correct |
143 ms |
3076 KB |
Partially correct |
19 |
Partially correct |
125 ms |
3108 KB |
Partially correct |