This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 (stderr)
Bruno.cpp:7:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
7 | int variable_example = 0;
| ^~~~~~~~~~~~~~~~
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |