#include <bits/extc++.h>
using namespace std;
using namespace __gnu_pbds;
// #define int long long
#define ll long long
#define f first
#define s second
#define all(x) x.begin(), x.end()
#define debug(x) [&](decltype(x) _x) {cerr << #x << " = " << _x << endl; return _x;}(x)
using pii = pair<int, int>;
const ll inf = 1ll << 60;
template <typename T, typename U>
ostream& operator<<(ostream& out, pair<T, U> p) {
return out << "(" << p.f << ", " << p.s << ")";
}
template <typename T, typename = decltype(begin(declval<T>()))>
typename enable_if<!is_same<T, string>::value, ostream&>::type operator<<(ostream& out, T x) {
string dlm = "";
out << "{";
for(auto i : x) {
out << dlm << i;
dlm = ", ";
}
return out << "}";
}
#include "Anna.h"
void Anna(int n, vector<char> s) {
char want = 'X';
for(int i = 0; i < n; i++) {
if(s[i] == want) {
Send(1);
if(want == 'Y') want = 'Z';
else want = 'Y';
} else {
Send(0);
}
}
}
#include <bits/extc++.h>
using namespace std;
using namespace __gnu_pbds;
// #define int long long
#define ll long long
#define f first
#define s second
#define all(x) x.begin(), x.end()
#define debug(x) [&](decltype(x) _x) {cerr << #x << " = " << _x << endl; return _x;}(x)
using pii = pair<int, int>;
const ll inf = 1ll << 60;
template <typename T, typename U>
ostream& operator<<(ostream& out, pair<T, U> p) {
return out << "(" << p.f << ", " << p.s << ")";
}
template <typename T, typename = decltype(begin(declval<T>()))>
typename enable_if<!is_same<T, string>::value, ostream&>::type operator<<(ostream& out, T x) {
string dlm = "";
out << "{";
for(auto i : x) {
out << dlm << i;
dlm = ", ";
}
return out << "}";
}
#include "Bruno.h"
void Bruno(int n, int l, vector<int> a) {
for(int i = 0; i < n; i++) {
if(!a[i]) Remove(i);
}
bool x = false;
for(int i = 0; i < n; i++) {
if(a[i]) {
if(x) Remove(i);
else x = true;
}
}
for(int i = 0; i < n; i++) {
if(a[i]) {
Remove(i);
break;
}
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
780 KB |
Output is correct |
2 |
Correct |
0 ms |
792 KB |
Output is correct |
3 |
Correct |
0 ms |
1036 KB |
Output is correct |
4 |
Correct |
0 ms |
780 KB |
Output is correct |
5 |
Incorrect |
0 ms |
852 KB |
Wrong Answer [6] |
6 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
35 ms |
8040 KB |
Wrong Answer [6] |
2 |
Halted |
0 ms |
0 KB |
- |