Submission #710406

# Submission time Handle Problem Language Result Execution time Memory
710406 2023-03-15T08:25:30 Z lmqzzz Ancient Machine (JOI21_ancient_machine) C++17
0 / 100
66 ms 8232 KB
#include "Anna.h"

#include <bits/stdc++.h>
using namespace std;

void Anna(int N, std::vector<char> S) {
        int last = -1;
        for (int i = 0; i < N; i++) {
                if (last == -1 && S[i] == 'X') {
                        Send(1);
                        last = i;
                } else if (last == -1) {
                        Send(0);
                } else if (S[i] == 'Z') {
                        Send(1);
                } else {
                        Send(0);
                }
        }
}
#include "Bruno.h"

#include <bits/stdc++.h>
using namespace std;

void Bruno(int N, int L, std::vector<int> A) {
        int last = -1;
        for (int i = 0; i < L; i++) {
                if (A[i]) {
                        if (last != -1) {
                                for (int j = i - 1; j > last; j--) Remove(j);
                                Remove(i);
                        }
                        last = i;
                }
        }
        int i = 0;
        while (i < N && A[i] == 0) Remove(i++);
        if (i < N) Remove(i);
        i = last + 1;
        while (i < N) Remove(i++);
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 504 KB Output is correct
2 Correct 0 ms 508 KB Output is correct
3 Correct 1 ms 520 KB Output is correct
4 Correct 0 ms 524 KB Output is correct
5 Correct 0 ms 512 KB Output is correct
6 Correct 0 ms 512 KB Output is correct
7 Correct 1 ms 520 KB Output is correct
8 Correct 2 ms 600 KB Output is correct
9 Correct 1 ms 512 KB Output is correct
10 Incorrect 1 ms 512 KB Wrong Answer [4]
11 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Partially correct 53 ms 7640 KB Partially correct
2 Partially correct 54 ms 8076 KB Partially correct
3 Partially correct 55 ms 8080 KB Partially correct
4 Partially correct 51 ms 8124 KB Partially correct
5 Partially correct 54 ms 8084 KB Partially correct
6 Partially correct 56 ms 8080 KB Partially correct
7 Partially correct 53 ms 8100 KB Partially correct
8 Partially correct 64 ms 8048 KB Partially correct
9 Partially correct 52 ms 8120 KB Partially correct
10 Partially correct 53 ms 8232 KB Partially correct
11 Partially correct 56 ms 8128 KB Partially correct
12 Partially correct 53 ms 8016 KB Partially correct
13 Partially correct 62 ms 8104 KB Partially correct
14 Partially correct 59 ms 8096 KB Partially correct
15 Partially correct 54 ms 8020 KB Partially correct
16 Partially correct 64 ms 8160 KB Partially correct
17 Partially correct 66 ms 8112 KB Partially correct
18 Incorrect 52 ms 7880 KB Wrong Answer [4]
19 Halted 0 ms 0 KB -