#include "Anna.h"
#include <bits/stdc++.h>
using namespace std;
namespace {
}
void Anna(int N, vector<char> S) {
bool active = 0;
for (int i = 0; i < N; i++){
if (S[i] == 'X'){
Send(!active);
active = 1;
}
else if (S[i] == 'Y') Send(0);
else Send(active);
}
}
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;
namespace {
} // namespace
void Bruno(int N, int L, vector<int> A) {
int prv = 0, fx = -1;
for (int i = 0; i < N; i++){
if (A[i]){
if (fx == -1){
fx = i; prv = i + 1;
}
else{
for (int j = i - 1; j >= prv; j--) Remove(j);
Remove(i);
prv = i + 1;
}
}
}
for (int i = 0; i <= fx; i++) Remove(i);
for (int i = prv; i < N; i++) Remove(i);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
772 KB |
Output is correct |
2 |
Correct |
0 ms |
780 KB |
Output is correct |
3 |
Correct |
0 ms |
788 KB |
Output is correct |
4 |
Correct |
0 ms |
792 KB |
Output is correct |
5 |
Correct |
0 ms |
788 KB |
Output is correct |
6 |
Correct |
1 ms |
792 KB |
Output is correct |
7 |
Correct |
1 ms |
780 KB |
Output is correct |
8 |
Correct |
0 ms |
780 KB |
Output is correct |
9 |
Correct |
1 ms |
780 KB |
Output is correct |
10 |
Correct |
0 ms |
776 KB |
Output is correct |
11 |
Correct |
1 ms |
792 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
44 ms |
7744 KB |
Partially correct |
2 |
Partially correct |
48 ms |
7892 KB |
Partially correct |
3 |
Partially correct |
46 ms |
7760 KB |
Partially correct |
4 |
Partially correct |
46 ms |
7912 KB |
Partially correct |
5 |
Partially correct |
49 ms |
7864 KB |
Partially correct |
6 |
Partially correct |
43 ms |
7912 KB |
Partially correct |
7 |
Partially correct |
44 ms |
7864 KB |
Partially correct |
8 |
Partially correct |
47 ms |
7748 KB |
Partially correct |
9 |
Partially correct |
52 ms |
7832 KB |
Partially correct |
10 |
Partially correct |
46 ms |
7956 KB |
Partially correct |
11 |
Partially correct |
43 ms |
7844 KB |
Partially correct |
12 |
Partially correct |
50 ms |
7716 KB |
Partially correct |
13 |
Partially correct |
53 ms |
7708 KB |
Partially correct |
14 |
Partially correct |
54 ms |
7720 KB |
Partially correct |
15 |
Partially correct |
47 ms |
7824 KB |
Partially correct |
16 |
Partially correct |
47 ms |
7712 KB |
Partially correct |
17 |
Partially correct |
53 ms |
7976 KB |
Partially correct |
18 |
Partially correct |
49 ms |
7784 KB |
Partially correct |
19 |
Partially correct |
52 ms |
8376 KB |
Partially correct |
20 |
Partially correct |
44 ms |
8220 KB |
Partially correct |
21 |
Partially correct |
43 ms |
8364 KB |
Partially correct |
22 |
Partially correct |
62 ms |
8172 KB |
Partially correct |
23 |
Partially correct |
53 ms |
8104 KB |
Partially correct |
24 |
Partially correct |
40 ms |
8356 KB |
Partially correct |
25 |
Partially correct |
53 ms |
8216 KB |
Partially correct |
26 |
Partially correct |
50 ms |
8244 KB |
Partially correct |
27 |
Partially correct |
46 ms |
8376 KB |
Partially correct |
28 |
Partially correct |
53 ms |
8364 KB |
Partially correct |
29 |
Partially correct |
49 ms |
8308 KB |
Partially correct |
30 |
Partially correct |
53 ms |
8356 KB |
Partially correct |
31 |
Partially correct |
57 ms |
8244 KB |
Partially correct |
32 |
Partially correct |
48 ms |
8228 KB |
Partially correct |
33 |
Partially correct |
49 ms |
8468 KB |
Partially correct |