Submission #1308996

#TimeUsernameProblemLanguageResultExecution timeMemory
1308996viobowAncient Machine (JOI21_ancient_machine)C++17
0 / 100
4 ms568 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[i] = (s[i] == 'X');
            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;
    int 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 + 1;
        }
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...