# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
523360 | amunduzbaev | Ancient Machine (JOI21_ancient_machine) | C++17 | 81 ms | 8544 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "Anna.h"
#include "bits/stdc++.h"
using namespace std;
#define ar array
void Anna(int n, vector<char> s) {
int f = -1;
for(int i=0;i<n;i++){
if(s[i] == 'X') { f = i; break; }
}
if(f == -1) return;
vector<int> res(n);
res[f] = 1;
for(int i=f+1;i<n;i++){
if(s[i] == 'Z') res[i] = 1;
}
for(int i=0;i<n;i++) Send(res[i]);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |