#include "Anna.h"
#include <utility>
#include <vector>
namespace {
int variable_example = 0;
}
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define ll long long
int Declare() {
variable_example++;
return 2000;
}
std::pair<std::vector<int>, std::vector<int> > Anna(long long A) {
vector <int> a,b;
for(ll i = 1;i <= 2000;i++) {
if(i * i >= A) {
ll val = i * i - A;
for(int j = 1;j <= min(val,i);j++)a.pb(1);
for(int j = val + 1;j <= i;j++)a.pb(0);
val = max(0ll,val - i);
for(int j = 1;j <= min(val,i);j++)b.pb(1);
for(int j = val + 1;j <= i;j++)b.pb(0);
break;
}
}
return mp(a,b);
}
#include "Bruno.h"
#include <utility>
#include <vector>
namespace {
int variable_example = 0;
}
#include <bits/stdc++.h>
using namespace std;
#define ll long long
long long Bruno(std::vector<int> u) {
ll sz = u.size();
sz /= 2ll;
ll k = sz * sz;
ll cnt = 0;
for(auto to : u) {
cnt += to;
}
return k - cnt;
}
Compilation message
Bruno.cpp:7:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
7 | int variable_example = 0;
| ^~~~~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
520 KB |
Output is correct |
2 |
Correct |
13 ms |
892 KB |
Output is correct |
3 |
Correct |
20 ms |
1272 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
520 KB |
Output is correct |
2 |
Correct |
13 ms |
892 KB |
Output is correct |
3 |
Correct |
20 ms |
1272 KB |
Output is correct |
4 |
Correct |
539 ms |
21932 KB |
Output is correct |
5 |
Correct |
496 ms |
21840 KB |
Output is correct |
6 |
Correct |
550 ms |
22316 KB |
Output is correct |
7 |
Correct |
508 ms |
21792 KB |
Output is correct |
8 |
Correct |
507 ms |
22184 KB |
Output is correct |
9 |
Correct |
717 ms |
32400 KB |
Output is correct |
10 |
Correct |
695 ms |
32448 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
520 KB |
Output is correct |
2 |
Correct |
13 ms |
892 KB |
Output is correct |
3 |
Correct |
20 ms |
1272 KB |
Output is correct |
4 |
Correct |
539 ms |
21932 KB |
Output is correct |
5 |
Correct |
496 ms |
21840 KB |
Output is correct |
6 |
Correct |
550 ms |
22316 KB |
Output is correct |
7 |
Correct |
508 ms |
21792 KB |
Output is correct |
8 |
Correct |
507 ms |
22184 KB |
Output is correct |
9 |
Correct |
717 ms |
32400 KB |
Output is correct |
10 |
Correct |
695 ms |
32448 KB |
Output is correct |
11 |
Incorrect |
0 ms |
524 KB |
Wrong Answer [3] |
12 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
520 KB |
Output is correct |
2 |
Correct |
13 ms |
892 KB |
Output is correct |
3 |
Correct |
20 ms |
1272 KB |
Output is correct |
4 |
Correct |
539 ms |
21932 KB |
Output is correct |
5 |
Correct |
496 ms |
21840 KB |
Output is correct |
6 |
Correct |
550 ms |
22316 KB |
Output is correct |
7 |
Correct |
508 ms |
21792 KB |
Output is correct |
8 |
Correct |
507 ms |
22184 KB |
Output is correct |
9 |
Correct |
717 ms |
32400 KB |
Output is correct |
10 |
Correct |
695 ms |
32448 KB |
Output is correct |
11 |
Incorrect |
0 ms |
524 KB |
Wrong Answer [3] |
12 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
520 KB |
Output is correct |
2 |
Correct |
13 ms |
892 KB |
Output is correct |
3 |
Correct |
20 ms |
1272 KB |
Output is correct |
4 |
Correct |
539 ms |
21932 KB |
Output is correct |
5 |
Correct |
496 ms |
21840 KB |
Output is correct |
6 |
Correct |
550 ms |
22316 KB |
Output is correct |
7 |
Correct |
508 ms |
21792 KB |
Output is correct |
8 |
Correct |
507 ms |
22184 KB |
Output is correct |
9 |
Correct |
717 ms |
32400 KB |
Output is correct |
10 |
Correct |
695 ms |
32448 KB |
Output is correct |
11 |
Incorrect |
0 ms |
524 KB |
Wrong Answer [3] |
12 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
528 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |