# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
600462 | Plurm | Financial Report (JOI21_financial) | C++11 | 4067 ms | 314516 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;
int a[300005];
int dp[7005][7005]; // dp[last][max]
int seg[7005][16384];
int lb[16384];
int rb[16384];
void build(int c, int l, int r){
lb[c] = l;
rb[c] = r;
if(l == r) return;
int k = (l+r)/2;
build(2*c, l, k);
build(2*c+1, k+1, r);
}
void update(int t, int c, int i, int x){
if(lb[c] == rb[c]){
seg[t][c] = x;
return;
}
int k = (lb[c] + rb[c]) / 2;
if(i <= k) update(t, 2*c, i, x);
else update(t, 2*c+1, i, x);
seg[t][c] = max(seg[t][2*c], seg[t][2*c+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... |