# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
518909 | Keshi | Ancient Machine (JOI21_ancient_machine) | C++17 | 70 ms | 13972 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Anna.h"
#include <vector>
namespace {
int variable_example = 0;
}
void Anna(int N, std::vector<char> S) {
variable_example++;
char x = 'X';
for(int i = 0; i < N; i++){
if(S[i] == x){
Send(1);
if(x == 'X') x = 'Y';
else if(x == 'Y') x = 'Z';
else x = 'Y';
}
else Send(0);
}
return;
}
//In the name of God
#include <bits/stdc++.h>
using namespace std;
#include "Bruno.h"
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int maxn = 2e5 + 100;
const int mod = 1e9 + 7;
const int inf = 1e9;
#define fast_io ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define file_io freopen("input.txt", "r+", stdin);freopen("output.txt", "w+", stdout);
#define pb push_back
#define Mp make_pair
#define F first
#define S second
#define Sz(x) ll((x).size())
#define all(x) (x).begin(), (x).end()
ll pw(ll a, ll b){
ll c = 1;
while(b){
if(b & 1) c = c * a % mod;
a = a * a % mod;
b >>= 1;
}
return c;
}
void Bruno(int N, int L, vector<int> A){
assert(N == L);
assert(L == Sz(A));
vector<int> vec;
for(int i = 0; i < N; i++){
if(A[i]) vec.pb(i);
}
for(int i = N; i--;){
if(!A[i]) Remove(i);
}
for(int i = 1; i < Sz(vec); i++){
Remove(vec[i]);
}
Remove(vec[0]);
return;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |