#include "Anna.h"
#include <vector>
void Anna(int N, std::vector<char> S) {
for(int i = 0; i < N; ++i) {
if(S[i] == 'X') {
Send(0);
}
else if(S[i] == 'Y') {
Send(0);
}
else {
Send(1);
}
}
for(int i = 0; i < N; ++i) {
if(S[i] == 'X') {
Send(0);
}
else if(S[i] == 'Y') {
Send(1);
}
else {
Send(0);
}
}
}
#include "Bruno.h"
#include <vector>
void Bruno(int N, int L, std::vector<int> A) {
std::vector<int> S(N), stk;
for(int i = 0; i < N; ++i) {
S[i] = (A[i] << 1) | A[N + i];
while(!stk.empty() && S[stk.back()] != S[i] - 1) {
Remove(stk.back());
stk.pop_back();
}
stk.push_back(i);
}
for(int i : stk) {
Remove(i);
}
}
# |
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 |
66 ms |
9804 KB |
Wrong Answer [6] |
2 |
Halted |
0 ms |
0 KB |
- |