#include "Anna.h"
#include <vector>
namespace {
int variable_example = 0;
}
void Anna(int N, std::vector<char> S) {
int i = 0;
while(i < N && S[i] != 'X')
{
Send(0);
i++;
}
if(i == N)
return;
Send(1);
i++;
char tar = 'Y';
while(i < N)
{
if(S[i] == tar)
{
Send(1);
tar = (tar == 'Y' ? 'Z' : 'Y');
}
else
Send(0);
i++;
}
}
#include "Bruno.h"
#include <vector>
namespace {
int variable_example = 0;
int FunctionExample(int P) { return 1 - P; }
} // namespace
void Bruno(int N, int L, std::vector<int> A) {
int i = 0, j = 0, x = 0, y = 0, z = 0;
for(; i < N; i++)
if(A[i] == 1)
{
x = i;
for(; j < i; j++)
Remove(j);
j = x + 1;
i = x + 1;
break;
}
for(; i < N; i++)
{
if(y == 0 && A[i])
y = i;
else if(y && A[i])
{
z = i;
for(; j < y; j++)
Remove(j);
j++;
for(; j < z; j++)
Remove(j);
Remove(y);
Remove(z);
j = z + 1;
y = 0;
}
}
for(; j < N; j++)
Remove(j);
Remove(x);
}
Compilation message
Anna.cpp:6:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
6 | int variable_example = 0;
| ^~~~~~~~~~~~~~~~
Bruno.cpp:8:5: warning: 'int {anonymous}::FunctionExample(int)' defined but not used [-Wunused-function]
8 | int FunctionExample(int P) { return 1 - P; }
| ^~~~~~~~~~~~~~~
Bruno.cpp:6:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
6 | int variable_example = 0;
| ^~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
516 KB |
Output is correct |
2 |
Correct |
1 ms |
512 KB |
Output is correct |
3 |
Correct |
0 ms |
520 KB |
Output is correct |
4 |
Correct |
1 ms |
604 KB |
Output is correct |
5 |
Incorrect |
0 ms |
520 KB |
Wrong Answer [6] |
6 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
55 ms |
7632 KB |
Wrong Answer [6] |
2 |
Halted |
0 ms |
0 KB |
- |