#include<bits/stdc++.h>
#include <vector>
#include "Anna.h"
#define pb push_back
using namespace std;
typedef vector<int> vi;
void Anna(int N, std::vector<char> S)
{
vi srt;
bool ok=0;
for(char c:S)
{
if(c=='X' and !ok)
{
ok=1;
if(srt.size())
{
srt.pop_back();
srt.pb(1);
}
}
if(!ok)
srt.pb(0);
else
srt.pb(c=='Z');
}
for(int x:srt)
Send(x);
}
#include<bits/stdc++.h>
#include <vector>
#include "Bruno.h"
#define pb push_back
using namespace std;
typedef vector<int> vi;
char ch[200005];
void Bruno(int N, int L, std::vector<int> A)
{
int st=0,luu;
for(int i=0;i<L;i++)
if(A[i])
{
st=i+1;
break;
}
for(int i=st-1;i>=0;i--)
Remove(i);
luu=st;
for(int i=st;i<L;i++)
{
if(A[i])
{
for(int run=i-1;run>st;run--)
Remove(run);
Remove(i);
st=i;
}
}
for(int i=st+1;i<L;i++)
Remove(i);
Remove(luu);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
508 KB |
Output is correct |
2 |
Correct |
0 ms |
508 KB |
Output is correct |
3 |
Correct |
1 ms |
508 KB |
Output is correct |
4 |
Incorrect |
1 ms |
508 KB |
Wrong Answer [4] |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
58 ms |
8136 KB |
Partially correct |
2 |
Partially correct |
63 ms |
8148 KB |
Partially correct |
3 |
Incorrect |
56 ms |
8184 KB |
Wrong Answer [6] |
4 |
Halted |
0 ms |
0 KB |
- |