#include "Anna.h"
#include<bits/stdc++.h>
using namespace std;
//#define int long long
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define foru(i, l, r) for(int i = l; i <= r; i++)
#define ford(i, r, l) for(int i = r; i >= l; i--)
typedef pair<int, int> ii;
typedef pair<ii, int> iii;
typedef pair<ii, ii> iiii;
//const int oo = 1e18 + 7, mod = 1e9 + 7;
void Anna(int n, vector<char> S){
int need = 0;
for(auto it : S){
if((it - 'X') == need){
Send(1);
need = (need + 1) % 3;
}
else Send(0);
}
}
/*
void process(){
}
signed main(){
ios_base::sync_with_stdio(0);
process();
}*/
#include<bits/stdc++.h>
#include "Bruno.h"
using namespace std;
//#define int long long
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define foru(i, l, r) for(int i = l; i <= r; i++)
#define ford(i, r, l) for(int i = r; i >= l; i--)
typedef pair<int, int> ii;
typedef pair<ii, int> iii;
typedef pair<ii, ii> iiii;
//const int N = 1e5 + 5;
//const int oo = 1e18 + 7, mod = 1e9 + 7;
void Bruno(int N, int L, vector<int> a){
//cout << N << " " << L << "\n";
vector<int> not_rev;
for(int i = 0; i < N; i++){
if(a[i] == 1) not_rev.pb(i);
else Remove(i);
}
for(int i = 1; i < not_rev.size(); i += 3){
Remove(not_rev[i]);
}
for(int i = 0; i < not_rev.size(); i++){
if((i % 3) != 1) Remove(not_rev[i]);
}
}
/*
void process(){
}
signed main(){
ios_base::sync_with_stdio(0);
process();
}*/
Compilation message
Bruno.cpp: In function 'void Bruno(int, int, std::vector<int>)':
Bruno.cpp:28:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
28 | for(int i = 1; i < not_rev.size(); i += 3){
| ~~^~~~~~~~~~~~~~~~
Bruno.cpp:31:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
31 | for(int i = 0; i < not_rev.size(); i++){
| ~~^~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
504 KB |
Wrong Answer [6] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
55 ms |
8208 KB |
Wrong Answer [6] |
2 |
Halted |
0 ms |
0 KB |
- |