# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
655898 | gs12117 | Broken Device 2 (JOI22_device2) | C++17 | 76 ms | 2936 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.
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <random>
int Declare() {
int max_m = 139;
return max_m;
}
std::pair<std::vector<int>, std::vector<int> > Anna(long long A) {
int max_m = 139;
long long int dp[200];
for (int i = 0; i < max_m; i++) {
if (i < 5)dp[i] = i + 1;
else dp[i] = dp[i - 2] + dp[i - 3];
}
int sz = 0;
for (int i = max_m - 3; i >= 0; i--) {
if (A < dp[i] * 4) {
sz = i;
break;
}
A -= dp[i] * 4;
}
int invt = 0;
if (A >= dp[sz] * 2) {
A -= dp[sz] * 2;
invt = 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... |