Submission #965084

#TimeUsernameProblemLanguageResultExecution timeMemory
965084LCJLYAncient Machine (JOI21_ancient_machine)C++17
0 / 100
52 ms8372 KiB
#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(1); cur++; } else Send(0); } else if(s[x]=='Y'){ if(cur==1){ Send(1); cur++; } else Send(0); } else{ if(cur==2){ Send(1); cur=0; } else Send(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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...