# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
707062 | lam | Progression (NOI20_progression) | C++14 | 1500 ms | 119488 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int inf = (int)1e18;
const int maxn = 3e5 + 10;
int n,m;
int D[maxn];
struct node
{
int pre,suf,val_l,val_r,sz,ans;
};
node hop(node x, node y)
{
if (x.val_l==-1e18) return y;
if (y.val_l==-1e18) return x;
node cur;
cur.sz=x.sz+y.sz;
cur.ans=max(x.ans,y.ans);
if (x.val_r==y.val_l) cur.ans=max(cur.ans,x.suf+y.pre);
cur.val_l=x.val_l; cur.val_r=y.val_r;
cur.pre = x.pre;
if (x.sz==x.pre&&x.val_r==y.val_l) cur.pre=max(cur.pre,x.sz+y.pre);
else cur.pre=x.pre;
cur.suf = y.suf;
if (y.sz==y.suf&&x.val_r==y.val_l) cur.suf=max(cur.suf,y.sz+x.suf);
return cur;
}
node none = {0,0,-inf,-inf,0,0};
struct segtree
{
# | 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... |