#include "Anna.h"
#include <bits/stdc++.h>
using namespace std;
void Anna(int N, std::vector<char> S) {
bool ok;
vector<int> v(N,0);
ok=0;
for (int i=0;i<N;i++) if (S[i]=='X' and !ok)
{
v[i]=1;ok=1;
}
else if (S[i]=='Z' and ok) v[i]=1;
for (int i=0;i<N;i++) Send(v[i]);
}
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;
void Bruno(int N, int L,std::vector<int> A) {
int p=-1,pos;
bool ok;
for (int i=0;i<N;i++)
if (A[i]==0) Remove(i);else
{
p=i;break;
}
pos=p;
if (p==-1) return;
do
{
ok=0;
for (int i=p+1;i<N;i++) if (A[i]==1)
{
ok=1;
for (int j=i-1;j>p;j--) Remove(j);
Remove(i);
p=i;
}
}
while (ok);
for (int i=p+1;i<N;i++) Remove(i);
Remove(pos);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
584 KB |
Output is correct |
2 |
Correct |
0 ms |
572 KB |
Output is correct |
3 |
Correct |
0 ms |
496 KB |
Output is correct |
4 |
Correct |
0 ms |
488 KB |
Output is correct |
5 |
Correct |
0 ms |
488 KB |
Output is correct |
6 |
Correct |
0 ms |
492 KB |
Output is correct |
7 |
Correct |
1 ms |
624 KB |
Output is correct |
8 |
Correct |
0 ms |
488 KB |
Output is correct |
9 |
Correct |
0 ms |
488 KB |
Output is correct |
10 |
Correct |
0 ms |
580 KB |
Output is correct |
11 |
Correct |
1 ms |
488 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
54 ms |
8372 KB |
Partially correct |
2 |
Partially correct |
56 ms |
8400 KB |
Partially correct |
3 |
Partially correct |
56 ms |
8444 KB |
Partially correct |
4 |
Partially correct |
54 ms |
8512 KB |
Partially correct |
5 |
Partially correct |
53 ms |
8408 KB |
Partially correct |
6 |
Partially correct |
53 ms |
8388 KB |
Partially correct |
7 |
Partially correct |
55 ms |
8480 KB |
Partially correct |
8 |
Partially correct |
57 ms |
8360 KB |
Partially correct |
9 |
Partially correct |
55 ms |
8300 KB |
Partially correct |
10 |
Partially correct |
52 ms |
8420 KB |
Partially correct |
11 |
Partially correct |
52 ms |
8452 KB |
Partially correct |
12 |
Partially correct |
53 ms |
8592 KB |
Partially correct |
13 |
Partially correct |
62 ms |
8524 KB |
Partially correct |
14 |
Partially correct |
65 ms |
8436 KB |
Partially correct |
15 |
Partially correct |
54 ms |
8360 KB |
Partially correct |
16 |
Partially correct |
55 ms |
8380 KB |
Partially correct |
17 |
Partially correct |
66 ms |
8468 KB |
Partially correct |
18 |
Partially correct |
59 ms |
8404 KB |
Partially correct |
19 |
Partially correct |
57 ms |
8344 KB |
Partially correct |
20 |
Partially correct |
50 ms |
8324 KB |
Partially correct |
21 |
Partially correct |
51 ms |
8424 KB |
Partially correct |
22 |
Partially correct |
63 ms |
8468 KB |
Partially correct |
23 |
Partially correct |
51 ms |
8340 KB |
Partially correct |
24 |
Partially correct |
52 ms |
8444 KB |
Partially correct |
25 |
Partially correct |
59 ms |
8456 KB |
Partially correct |
26 |
Partially correct |
60 ms |
8456 KB |
Partially correct |
27 |
Partially correct |
60 ms |
8360 KB |
Partially correct |
28 |
Partially correct |
62 ms |
8468 KB |
Partially correct |
29 |
Partially correct |
59 ms |
8336 KB |
Partially correct |
30 |
Partially correct |
60 ms |
8492 KB |
Partially correct |
31 |
Partially correct |
59 ms |
8436 KB |
Partially correct |
32 |
Partially correct |
55 ms |
8332 KB |
Partially correct |
33 |
Partially correct |
55 ms |
8452 KB |
Partially correct |