# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
265360 | eohomegrownapps | Progression (NOI20_progression) | C++14 | 2805 ms | 68440 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;
typedef long long ll;
int deltas[400000];
struct Data{
int len = 1;
int maxpref=1;
int maxsuff=1;
ll prefval=0;
ll suffval=0;
int maxlen=1;
ll deltasum = 0;
};
int n;
int ncnt=0;
Data combine(const Data &l, const Data &r){
Data ans;
ans.len = l.len + r.len;
ans.deltasum = l.deltasum + r.deltasum;
ans.maxpref = l.maxpref;
ans.prefval = l.prefval;
ans.maxsuff = r.maxsuff;
ans.suffval = r.suffval;
if (l.maxpref==l.len&&l.prefval==r.prefval){
ans.maxpref=l.len+r.maxpref;
}
if (r.maxpref==r.len&&r.prefval==l.suffval){
# | 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... |