# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
979395 | Andrey | Fish 3 (JOI24_fish3) | C++14 | 1474 ms | 608604 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<bits/stdc++.h>
using namespace std;
vector<long long> haha(300001);
vector<long long> wow(1200001);
vector<long long> bruh[12000001];
vector<long long> yay[1200001];
vector<long long> yeah[1200001];
long long sm = LLONG_MAX,ans = 0,d;
void build(long long l, long long r, long long x) {
bruh[x].push_back(LLONG_MAX);
yay[x].push_back(0);
yeah[x].push_back(0);
long long sb = 0,br = 0;
for(long long i = r; i >= l; i--) {
long long c = bruh[x][bruh[x].size()-1];
long long f = 0;
if(c < haha[i]) {
f = (haha[i]-c+d-1)/d;
}
wow[x]+=f;
bruh[x].push_back(haha[i]-f*d);
long long e = haha[i]-f*d;
if(c != LLONG_MAX) {
br+=(c-e)/d;
}
yay[x].push_back(br);
sb+=br;
yeah[x].push_back(sb);
# | 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... |