제출 #1320180

#제출 시각아이디문제언어결과실행 시간메모리
1320180PlayVoltzAncient Machine (JOI21_ancient_machine)C++20
70 / 100
41 ms6608 KiB
#include "Anna.h" #include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define pii pair<int, int> #define fi first #define se second void Anna(int n, vector<char> s){ vector<int> res(n, 0); bool foundz=0, y=1; for (int i=n-1; i>=0; --i){ if (!foundz){ if (s[i]=='Z')foundz=1, res[i]=1; continue; } if (y){ if (s[i]=='Y')y=0, res[i]=1; } else{ if (s[i]=='X')y=1, res[i]=1; } } for (auto a:res)Send(a); }
#include "Bruno.h" #include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define pii pair<int, int> #define fi first #define se second void Bruno(int n, int l, vector<int> a){ vector<int> vect; for (int i=0; i<n; ++i){ if (a[i])vect.pb(i); else Remove(i); } for (int i=vect.size()-2; i>=0; --i)Remove(vect[i]); if (vect.size())Remove(vect.back()); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...