#include "Anna.h"
#include <vector>
void Anna(int N, std::vector<char> S) {
int i = 0;
while(i < N && S[i] != 'X')
++i;
if(i == N)
return;
for(int j = 0; j < i; ++j)
Send(0);
Send(1);
for(int j = i + 1; j < N; ++j)
Send((int)(S[j] == 'Z'));
}
#include "Bruno.h"
#include <algorithm>
#include <vector>
#include <iostream>
#include <cassert>
void Bruno(int N, int L, std::vector<int> A) {
if(L == 0) {
for(int i = 0; i < N; ++i)
Remove(i);
}
else {
int i = 0;
while(!A[i])
++i;
for(int j = 0; j < i; ++j)
Remove(j);
for(int j = i + 1; j < N; ++j) {
if(A[j]) {
for(int k = j - 1; !A[k]; --k)
Remove(k);
Remove(j);
}
}
for(int j = N - 1; !A[j]; --j)
Remove(j);
Remove(i);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
520 KB |
Output is correct |
2 |
Correct |
0 ms |
520 KB |
Output is correct |
3 |
Correct |
1 ms |
596 KB |
Output is correct |
4 |
Correct |
1 ms |
520 KB |
Output is correct |
5 |
Correct |
0 ms |
584 KB |
Output is correct |
6 |
Correct |
0 ms |
516 KB |
Output is correct |
7 |
Correct |
0 ms |
512 KB |
Output is correct |
8 |
Correct |
1 ms |
660 KB |
Output is correct |
9 |
Correct |
0 ms |
512 KB |
Output is correct |
10 |
Correct |
1 ms |
588 KB |
Output is correct |
11 |
Correct |
0 ms |
512 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
49 ms |
7884 KB |
Partially correct |
2 |
Partially correct |
48 ms |
8100 KB |
Partially correct |
3 |
Partially correct |
59 ms |
8092 KB |
Partially correct |
4 |
Partially correct |
48 ms |
8052 KB |
Partially correct |
5 |
Partially correct |
48 ms |
8096 KB |
Partially correct |
6 |
Partially correct |
48 ms |
8072 KB |
Partially correct |
7 |
Partially correct |
49 ms |
8056 KB |
Partially correct |
8 |
Partially correct |
47 ms |
8124 KB |
Partially correct |
9 |
Partially correct |
49 ms |
8092 KB |
Partially correct |
10 |
Partially correct |
51 ms |
8120 KB |
Partially correct |
11 |
Partially correct |
47 ms |
8076 KB |
Partially correct |
12 |
Partially correct |
49 ms |
8092 KB |
Partially correct |
13 |
Partially correct |
55 ms |
8096 KB |
Partially correct |
14 |
Partially correct |
56 ms |
8024 KB |
Partially correct |
15 |
Partially correct |
53 ms |
8172 KB |
Partially correct |
16 |
Partially correct |
51 ms |
8072 KB |
Partially correct |
17 |
Partially correct |
54 ms |
8116 KB |
Partially correct |
18 |
Correct |
40 ms |
6796 KB |
Output is correct |
19 |
Correct |
43 ms |
6648 KB |
Output is correct |
20 |
Partially correct |
48 ms |
8104 KB |
Partially correct |
21 |
Partially correct |
48 ms |
8100 KB |
Partially correct |
22 |
Partially correct |
56 ms |
8124 KB |
Partially correct |
23 |
Partially correct |
48 ms |
8080 KB |
Partially correct |
24 |
Partially correct |
48 ms |
8120 KB |
Partially correct |
25 |
Correct |
44 ms |
6708 KB |
Output is correct |
26 |
Partially correct |
55 ms |
8068 KB |
Partially correct |
27 |
Partially correct |
54 ms |
8124 KB |
Partially correct |
28 |
Partially correct |
55 ms |
8132 KB |
Partially correct |
29 |
Correct |
41 ms |
6712 KB |
Output is correct |
30 |
Partially correct |
57 ms |
8136 KB |
Partially correct |
31 |
Correct |
41 ms |
6656 KB |
Output is correct |
32 |
Partially correct |
48 ms |
8024 KB |
Partially correct |
33 |
Partially correct |
48 ms |
8128 KB |
Partially correct |