#include "Anna.h"
#include <vector>
using namespace std;
const int L = 2000;
typedef vector<int> vi;
namespace {
}
int Declare() {
return L;
}
pair<vi, vi> Anna(long long x) {
x--;
int l = 1;
while (x >= l * 2 + 1)
x -= l * 2 + 1, l++;
vi aa(l, 0);
vi bb(l, 0);
if (x <= l)
for (int i = 0; i < x; i++)
aa[i] = 1;
else {
for (int i = 0; i < l; i++)
aa[i] = 1;
for (int i = 0; i < x - l; i++)
bb[i] = 1;
}
return make_pair(aa, bb);
}
#include "Bruno.h"
#include <vector>
using namespace std;
typedef vector<int> vi;
namespace {
}
long long Bruno(vi cc) {
int l = cc.size() / 2, x = 1;
for (int k = 1; k < l; k++)
x += k * 2 + 1;
for (int i = 0; i < l * 2; i++)
if (cc[i] == 1)
x++;
return x;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
516 KB |
Output is correct |
2 |
Correct |
13 ms |
840 KB |
Output is correct |
3 |
Correct |
22 ms |
1176 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
516 KB |
Output is correct |
2 |
Correct |
13 ms |
840 KB |
Output is correct |
3 |
Correct |
22 ms |
1176 KB |
Output is correct |
4 |
Correct |
515 ms |
22056 KB |
Output is correct |
5 |
Correct |
496 ms |
21804 KB |
Output is correct |
6 |
Correct |
498 ms |
22196 KB |
Output is correct |
7 |
Correct |
499 ms |
21760 KB |
Output is correct |
8 |
Correct |
508 ms |
22224 KB |
Output is correct |
9 |
Correct |
756 ms |
32528 KB |
Output is correct |
10 |
Correct |
715 ms |
32612 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
516 KB |
Output is correct |
2 |
Correct |
13 ms |
840 KB |
Output is correct |
3 |
Correct |
22 ms |
1176 KB |
Output is correct |
4 |
Correct |
515 ms |
22056 KB |
Output is correct |
5 |
Correct |
496 ms |
21804 KB |
Output is correct |
6 |
Correct |
498 ms |
22196 KB |
Output is correct |
7 |
Correct |
499 ms |
21760 KB |
Output is correct |
8 |
Correct |
508 ms |
22224 KB |
Output is correct |
9 |
Correct |
756 ms |
32528 KB |
Output is correct |
10 |
Correct |
715 ms |
32612 KB |
Output is correct |
11 |
Incorrect |
0 ms |
676 KB |
Wrong Answer [3] |
12 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
516 KB |
Output is correct |
2 |
Correct |
13 ms |
840 KB |
Output is correct |
3 |
Correct |
22 ms |
1176 KB |
Output is correct |
4 |
Correct |
515 ms |
22056 KB |
Output is correct |
5 |
Correct |
496 ms |
21804 KB |
Output is correct |
6 |
Correct |
498 ms |
22196 KB |
Output is correct |
7 |
Correct |
499 ms |
21760 KB |
Output is correct |
8 |
Correct |
508 ms |
22224 KB |
Output is correct |
9 |
Correct |
756 ms |
32528 KB |
Output is correct |
10 |
Correct |
715 ms |
32612 KB |
Output is correct |
11 |
Incorrect |
0 ms |
676 KB |
Wrong Answer [3] |
12 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
516 KB |
Output is correct |
2 |
Correct |
13 ms |
840 KB |
Output is correct |
3 |
Correct |
22 ms |
1176 KB |
Output is correct |
4 |
Correct |
515 ms |
22056 KB |
Output is correct |
5 |
Correct |
496 ms |
21804 KB |
Output is correct |
6 |
Correct |
498 ms |
22196 KB |
Output is correct |
7 |
Correct |
499 ms |
21760 KB |
Output is correct |
8 |
Correct |
508 ms |
22224 KB |
Output is correct |
9 |
Correct |
756 ms |
32528 KB |
Output is correct |
10 |
Correct |
715 ms |
32612 KB |
Output is correct |
11 |
Incorrect |
0 ms |
676 KB |
Wrong Answer [3] |
12 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
409 ms |
524288 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |