#include "Anna.h"
#include <vector>
void Anna(int N, std::vector<char> S) {
int i = 0;
for(; i + 1 < N && S[i] != 'X'; ++i) {
Send(0);
}
Send(1);
for(++i; i < N; ++i) {
if(S[i] == 'Z') {
Send(1);
}
else {
Send(0);
}
}
}
#include "Bruno.h"
#include <vector>
#include <iostream>
void Bruno(int N, int L, std::vector<int> A) {
int i = 0;
for(; A[i] == 0; ++i) {
Remove(i);
}
std::vector<int> stk;
for(; i < N; ++i) {
if(i > 0 && A[i] > 0) {
while((int)stk.size() > 1) {
Remove(stk.back());
stk.pop_back();
}
Remove(i);
}
else {
stk.push_back(i);
}
}
for(int i : stk) {
Remove(i);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
508 KB |
Wrong Answer [6] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
53 ms |
7672 KB |
Partially correct |
2 |
Partially correct |
49 ms |
7636 KB |
Partially correct |
3 |
Partially correct |
48 ms |
7692 KB |
Partially correct |
4 |
Partially correct |
48 ms |
7672 KB |
Partially correct |
5 |
Incorrect |
47 ms |
7640 KB |
Wrong Answer [6] |
6 |
Halted |
0 ms |
0 KB |
- |