# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
394383 | oolimry | Ancient Machine (JOI21_ancient_machine) | C++17 | 772 ms | 8640 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Anna.h"
#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int) x.size())
#define show(x) cerr << #x << " is " << x << endl;
#define show2(x, y) cerr << #x << " is " << x << ", " << #y << " is " << y << endl;
typedef long long lint;
typedef pair<lint, lint> ii;
void Anna(int n, vector<char> s){
bool hasX = false;
bool hasY = false;
for(int i = 0;i < n;i++){
int res = 0;
if(s[i] == 'X'){
if(hasX) res = 0;
else{
res = 1;
hasX = 1;
}
}
else{
if(hasX){
if(s[i] == 'Y'){
if(hasY) res = 0;
else res = 1, hasY = true;
}
else{
if(hasY) res = 1, hasY = false;
else res = 0;
}
}
else res = 0;
}
Send(res);
}
}
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int) x.size())
#define show(x) cerr << #x << " is " << x << endl;
#define show2(x, y) cerr << #x << " is " << x << ", " << #y << " is " << y << endl;
typedef long long lint;
typedef pair<lint, lint> ii;
void Bruno(int n, int L, vector<int> A) {
for(int i = 0;i < n;i++){
show(A[i]);
if(A[i] == 0) Remove(i);
}
int X = -1;;
for(int i = 0;i < n;i++){
if(A[i] == 1){
if(X != -1) Remove(i);
else X = i;
}
}
if(X != -1) Remove(X);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |