#include "Anna.h"
#include<bits/stdc++.h>
using namespace std;
void Anna(int n, vector<char>S){
int ptr = n - 1;
vector<int>send(n, 0);
while(ptr > -1 && S[ptr] != 'Z'){
ptr--;
}
if(ptr > -1){
send[ptr--] = 1;
while(ptr > -1){
while(ptr > -1 && S[ptr] != 'X'){
ptr--;
}
while(ptr > -1 && S[ptr] == 'X'){
send[ptr--] = 1;
}
}
}
for(int& x : send){
Send(x);
}
}
#include "Bruno.h"
#include<bits/stdc++.h>
using namespace std;
void Bruno(int n, int sz_a, vector<int>A){
int ptr = n - 1;
while(ptr > -1 && A[ptr] == 0){
Remove(ptr--);
}
if(ptr > -1){
int last = ptr--;
while(ptr > -1){
int r_ptr = ptr;
while(ptr > -1 && A[ptr] == 0){
ptr--;
}
for(int i = ptr + 1; i <= r_ptr; i++){
Remove(i);
}
Remove(ptr--);
while(ptr > -1 && A[ptr] == 1){
Remove(ptr--);
}
}
Remove(last);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
792 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
40 ms |
8064 KB |
Partially correct |
2 |
Incorrect |
32 ms |
7816 KB |
Wrong Answer [3] |
3 |
Halted |
0 ms |
0 KB |
- |