# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
496198 | minhcool | Ancient Machine (JOI21_ancient_machine) | C++17 | 0 ms | 0 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 int long long
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define foru(i, l, r) for(int i = l; i <= r; i++)
#define ford(i, r, l) for(int i = r; i >= l; i--)
typedef pair<int, int> ii;
typedef pair<ii, int> iii;
typedef pair<ii, ii> iiii;
const int oo = 1e18 + 7, mod = 1e9 + 7;
void Anna(int n, vector<char> S){
int need = 0;
for(auto it : S){
if((it - 'X') == need){
Send(1);
need = (need + 1) % 3;
}
}
}
/*
void process(){
}
signed main(){
ios_base::sync_with_stdio(0);
process();
}*/
#include<bits/stdc++.h>
//#include<Bruno.h>
using namespace std;
//#define int long long
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define foru(i, l, r) for(int i = l; i <= r; i++)
#define ford(i, r, l) for(int i = r; i >= l; i--)
typedef pair<int, int> ii;
typedef pair<ii, int> iii;
typedef pair<ii, ii> iiii;
const int N = 1e5 + 5;
const int oo = 1e18 + 7, mod = 1e9 + 7;
void Bruno(int N, int L, vector<int> a){
assert(L == N);
vector<int> not_rev;
for(int i = 0; i < n; i++){
if(a[i] == 1) not_rev.pb(i);
else Remove(i);
}
for(int i = 1; i < not_rev.size(); i += 3){
Remove(not_rev[i]);
}
for(int i = 0; i < not_rev.size(); i++){
if((i % 3) != 1) Remove(not_rev[i]);
}
}
/*
void process(){
}
signed main(){
ios_base::sync_with_stdio(0);
process();
}*/