#include "Anna.h"
#include <vector>
void Anna(int N, std::vector<char> S) {
for(int i = 0; i < N; ++i)
Send((int)(S[i] == 'Z'));
}
#include "Bruno.h"
#include <algorithm>
#include <vector>
#include <iostream>
#include <cassert>
void Bruno(int N, int L, std::vector<int> A) {
assert(N == L);
std::vector<int> stk;
for(int i = 0; i < N; ++i) {
if(A[i]) {
while(!stk.empty()) {
Remove(stk.back());
stk.pop_back();
}
Remove(i);
}
else {
stk.push_back(i);
}
}
while(!stk.empty()) {
Remove(stk.back());
stk.pop_back();
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
512 KB |
Wrong Answer [6] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
57 ms |
7780 KB |
Wrong Answer [6] |
2 |
Halted |
0 ms |
0 KB |
- |