#include<bits/stdc++.h>
#ifndef SKY
#include "Anna.h"
#endif // SKY
using namespace std;
#define N 100010
#define ll long long
#define ii pair<int,int>
#define fs first
#define sc second
#define pb push_back
#define iii pair<int,ii>
#ifdef SKY
void Send(int a)
{
cout<<a<<" ";
}
#endif // SKY
void Anna(int n, vector<char> s)
{
for(int i=0;i<n;i++)
if(s[i]=='Z')
Send(1);
else Send(0);
}
#ifdef SKY
int main()
{
freopen("A.inp","r",stdin);
freopen("A.out","w",stdout);
ios::sync_with_stdio(0);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin>>n;
vector<char>s;
for(int i=1;i<=n;i++)
{
char ch;
cin>>ch;
s.pb(ch);
}
Anna(n,s);
return 0;
}
#endif // SKY
#include<bits/stdc++.h>
#ifndef SKY
#include "Bruno.h"
#endif // SKY
using namespace std;
#define N 100010
#define ll long long
#define ii pair<int,int>
#define fs first
#define sc second
#define pb push_back
#define iii pair<int,ii>
#ifdef SKY
void Remove(int d)
{
cout<<d<<" ";
}
#endif // SKY
void Bruno(int n,int L, vector<int> a)
{
int pos=0;
for(int i=0;i<n;i++)
if(a[i]==1)
{
//cout<<i<<endl;
for(int j=i-1;j>=pos;j--)
Remove(j);
Remove(i);
pos=i+1;
}
for(int i=pos;i<n;i++)
Remove(i);
}
#ifdef SKY
int main()
{
freopen("A.inp","r",stdin);
freopen("A.out","w",stdout);
ios::sync_with_stdio(0);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin>>n;
vector<int>a;
for(int i=1;i<=n;i++)
{
int u;
cin>>u;
a.pb(u);
}
Bruno(n,n,a);
return 0;
}
#endif // SKY
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
636 KB |
Wrong Answer [6] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
52 ms |
8104 KB |
Wrong Answer [6] |
2 |
Halted |
0 ms |
0 KB |
- |