| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 588791 | LastRonin | Broken Device 2 (JOI22_device2) | C++17 | 768 ms | 32432 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#pragma GCC optimize("O3")
#include "Anna.h"
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define mp make_pair
#define f first
#define s second
#define pb push_back
#define pill pair<ll, ll>
#define speed ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define pld pair<ld, ld>
using namespace std;
namespace {
}
int Declare() {
return 2000;
}
pair<vector<int>, vector<int> > Anna(long long A) {
vector<int> X;
vector<int> Y;
if(A > 4e6)return mp(X, Y);
A--;
for(int j = 2; j <= 4000; j += 2) {
if(A > j){
A -= (j + 1);
continue;
}
int k = A;
ll z = min(k, j/2);
ll ost = k - z;
while(z--)X.pb(1);
while(ost--)Y.pb(1);
while(X.size() < j/2)X.pb(0);
while(Y.size() < j/2)Y.pb(0);
break;
}
return make_pair(X, Y);
}
#include "Bruno.h"
#include <utility>
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define mp make_pair
#define f first
#define s second
#define pb push_back
#define pill pair<ll, ll>
#define speed ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define pld pair<ld, ld>
using namespace std;
namespace {
int variable_example = 0;
}
long long Bruno(std::vector<int> u) {
int cnt = 0;
for(auto v : u)
cnt += v;
ll L = 0;
for(int j = 2; j < u.size(); j += 2) {
L += (j + 1);
}
return L + cnt + 1;
}
Compilation message (stderr)
| # | 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... | ||||
