#include "Anna.h"
#include <vector>
#include <iostream>
using namespace std;
void Anna(int N, vector<char> S) {
char target = 'X';
for (int i = 0; i < N; target = 'Z') {
int j = i;
while (j < N and S[j] != target) {
Send(0);
j++;
}
if (j >= N) break;
Send(1);
i = j + 1;
}
}
#include "Bruno.h"
#include <vector>
#include <string>
#include <cstring>
#include <iostream>
#include <bitset>
using namespace std;
namespace {
}
void Bruno(int N, int L, std::vector<int> A) {
vector<int> check_points;
for (int i = 0; i < L; i++)
if (A[i])
check_points.push_back(i);
check_points.push_back(N);
for (int i = 1; i < (int)check_points.size(); i++) {
for (int j = check_points[i] - 1; j > check_points[i - 1]; j--)
Remove(j);
if (check_points[i] < N)
Remove(check_points[i]);
}
for (int j = 0; j <= check_points.front(); j++)
if (j < N)
Remove(j);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
516 KB |
Output is correct |
2 |
Correct |
1 ms |
604 KB |
Output is correct |
3 |
Correct |
1 ms |
520 KB |
Output is correct |
4 |
Correct |
1 ms |
512 KB |
Output is correct |
5 |
Correct |
1 ms |
520 KB |
Output is correct |
6 |
Correct |
1 ms |
608 KB |
Output is correct |
7 |
Correct |
1 ms |
520 KB |
Output is correct |
8 |
Correct |
2 ms |
512 KB |
Output is correct |
9 |
Correct |
0 ms |
512 KB |
Output is correct |
10 |
Correct |
1 ms |
512 KB |
Output is correct |
11 |
Correct |
1 ms |
512 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
51 ms |
7640 KB |
Partially correct |
2 |
Partially correct |
53 ms |
8152 KB |
Partially correct |
3 |
Partially correct |
56 ms |
8084 KB |
Partially correct |
4 |
Partially correct |
54 ms |
8100 KB |
Partially correct |
5 |
Partially correct |
48 ms |
8112 KB |
Partially correct |
6 |
Partially correct |
52 ms |
8108 KB |
Partially correct |
7 |
Partially correct |
51 ms |
8132 KB |
Partially correct |
8 |
Partially correct |
62 ms |
8088 KB |
Partially correct |
9 |
Partially correct |
49 ms |
8148 KB |
Partially correct |
10 |
Partially correct |
52 ms |
8088 KB |
Partially correct |
11 |
Partially correct |
64 ms |
8080 KB |
Partially correct |
12 |
Partially correct |
55 ms |
8088 KB |
Partially correct |
13 |
Partially correct |
61 ms |
8092 KB |
Partially correct |
14 |
Partially correct |
61 ms |
8112 KB |
Partially correct |
15 |
Partially correct |
57 ms |
8120 KB |
Partially correct |
16 |
Partially correct |
52 ms |
8068 KB |
Partially correct |
17 |
Partially correct |
56 ms |
8004 KB |
Partially correct |
18 |
Partially correct |
56 ms |
8124 KB |
Partially correct |
19 |
Partially correct |
67 ms |
8084 KB |
Partially correct |
20 |
Partially correct |
49 ms |
8064 KB |
Partially correct |
21 |
Partially correct |
48 ms |
8008 KB |
Partially correct |
22 |
Partially correct |
60 ms |
8092 KB |
Partially correct |
23 |
Partially correct |
49 ms |
8128 KB |
Partially correct |
24 |
Partially correct |
51 ms |
8096 KB |
Partially correct |
25 |
Partially correct |
61 ms |
8080 KB |
Partially correct |
26 |
Partially correct |
60 ms |
8032 KB |
Partially correct |
27 |
Partially correct |
57 ms |
8092 KB |
Partially correct |
28 |
Partially correct |
56 ms |
8120 KB |
Partially correct |
29 |
Partially correct |
60 ms |
8000 KB |
Partially correct |
30 |
Partially correct |
65 ms |
8092 KB |
Partially correct |
31 |
Partially correct |
60 ms |
8092 KB |
Partially correct |
32 |
Partially correct |
54 ms |
8112 KB |
Partially correct |
33 |
Partially correct |
51 ms |
8116 KB |
Partially correct |