# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1026287 | AdamGS | Ancient Machine (JOI21_ancient_machine) | C++17 | 45 ms | 8636 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Anna.h"
#include<bits/stdc++.h>
using namespace std;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
void Anna(int n, vector<char>T) {
vector<int>P(n);
int akt=0;
rep(i, n) if(T[i]=='X'+akt) {
P[i]=1;
++akt;
if(akt==3) akt=1;
}
rep(i, n) Send(P[i]);
}
#include "Bruno.h"
#include<bits/stdc++.h>
using namespace std;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
void Bruno(int n, int m, vector<int>T) {
rep(i, n) if(!T[i]) Remove(i);
int akt=0;
rep(i, n) if(T[i]) {
if(akt>0) Remove(i);
++akt;
if(akt==3) akt=1;
}
akt=0;
rep(i, n) if(T[i]) {
if(akt==0) Remove(i);
++akt;
if(akt==3) akt=1;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |