# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
965081 | LCJLY | Ancient Machine (JOI21_ancient_machine) | C++17 | 4 ms | 1232 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 show(x,y) cout << y << " " << #x << endl;
#define show2(x,y,i,j) cout << y << " " << #x << " " << j << " " << #i << endl;
#define show3(x,y,i,j,p,q) cout << y << " " << #x << " " << j << " " << #i << " " << q << " " << #p << endl;
#define show4(x,y) for(auto it:y) cout << it << " "; cout << #x << endl;
typedef pair<int,int>pii;
typedef pair<int,pii>pi2;
void Anna(int n, vector<char>s){
int cur=0;
for(int x=0;x<n;x++){
if(s[x]=='X'){
if(cur==0){
Send(x);
cur++;
}
}
else if(s[x]=='Y'){
if(cur==1){
Send(x);
cur++;
}
}
else{
if(cur==2){
Send(x);
cur=0;
}
}
}
}
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;
#define show(x,y) cout << y << " " << #x << endl;
#define show2(x,y,i,j) cout << y << " " << #x << " " << j << " " << #i << endl;
#define show3(x,y,i,j,p,q) cout << y << " " << #x << " " << j << " " << #i << " " << q << " " << #p << endl;
#define show4(x,y) for(auto it:y) cout << it << " "; cout << #x << endl;
typedef pair<int,int>pii;
typedef pair<int,pii>pi2;
void Bruno(int n, int l, vector<int>a){
vector<int>v;
for(int x=0;x<l;x++){
if(a[x]==0){
Remove(x);
}
else v.push_back(x);
}
int sz=v.size();
for(int x=1;x<sz;x+=3){
Remove(v[x]);
}
for(int x=0;x<sz;x++){
if(x%3==1) continue;
Remove(v[x]);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |