제출 #1324031

#제출 시각아이디문제언어결과실행 시간메모리
1324031PlayVoltzAncient Machine (JOI21_ancient_machine)C++20
0 / 100
37 ms6196 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 found=0;
	for (int i=0; i<n; ++i){
		if (!found){
			if (s[i]=='X')found=1, res[i]=1;
			continue;
		}
		if (s[i]=='Z')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);
	for (int i=0; i<vect[0]; ++i)Remove(i);
	for (int i=vect.back()+1; i<n; ++i)Remove(i);
	for (int i=1; i<vect.size(); ++i){
		for (int j=vect[i]-1; j>vect[i-1]; ++j)Remove(j);
		Remove(vect[i]);
	}
	Remove(vect[0]);
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...