Submission #1309223

#TimeUsernameProblemLanguageResultExecution timeMemory
1309223viobowAncient Machine (JOI21_ancient_machine)C++17
0 / 100
44 ms6456 KiB
#include "Anna.h"
#include <vector>
using namespace std;

void Anna(int n, std::vector<char> s) {
    vector<int> res;

    for (int st = 0; st < n; st++) {
        if (s[st] == 'X') {
            for (int i = st; i < n; i++)
                res.push_back(s[i] == 'Z');
            break;
        }
    }
    for (int val : res) Send(val);
}
#include "Bruno.h"
#include <vector>
using namespace std;

void Bruno(int n, int L, std::vector<int> A) {
    int start = n - L, last = 0;
    for (int i = 0; i < L; i++) {
        if (A[i] == 1) {
            for (int j = last + 1; j <= i; j++)
                Remove(start + j);
            last = i;
        }
    }
    for (int i = 0; i <= start; i++) Remove(i);
    for (int i = last + 1; i < L; i++) Remove(start + i);
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...