#include "Anna.h"
#include <bits/stdc++.h>
using namespace std;
void Anna(int N, std::vector<char> S) {
int last = -1;
for (int i = 0; i < N; i++) {
if (last == -1 && S[i] == 'X') {
Send(1);
last = i;
} else if (last == -1) {
Send(0);
} else if (S[i] == 'Z') {
Send(1);
} else {
Send(0);
}
}
}
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;
void Bruno(int N, int L, std::vector<int> A) {
int last = -1;
for (int i = 0; i < L; i++) {
if (A[i]) {
if (last != -1) {
for (int j = i - 1; j > last; j--) Remove(j);
Remove(i);
}
last = i;
}
}
int i = 0;
while (i < N && A[i] == 0) Remove(i++);
if (i == N) return;
i = last + 1;
while (i < N) Remove(i++);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
508 KB |
Wrong Answer [5] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
45 ms |
7468 KB |
Wrong Answer [5] |
2 |
Halted |
0 ms |
0 KB |
- |