# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
419710 | amoo_safar | Ancient Machine (JOI21_ancient_machine) | C++17 | 75 ms | 8388 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Anna.h"
#include <bits/stdc++.h>
using namespace std;
void Anna(int _n, vector<char> S) {
int fl = 0;
for(auto c : S){
int rs = 0;
if(fl == 1 && c == 'Z') rs = 1;
if(fl == 0 && c == 'X') fl = 1, rs = 1;
Send(rs);
}
}
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;
void Bruno(int _n, int L, vector<int> A) {
int cnt = 0;
vector<int> mk(_n, 0);
for (int i = 0; i < L; i++) {
if(A[i] == 1){
cnt ++;
for(int j = i - 1; j >= 0; j--){
if(A[j] == 1) break;
Remove(j);
mk[j] = 1;
}
if(cnt != 1){
Remove(i);
mk[i] = 1;
}
}
}
for(int i = 0; i < _n; i++) if(!mk[i]) Remove(i);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |