# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
102082 | ainta | Bitaro, who Leaps through Time (JOI19_timeleap) | C++17 | 1851 ms | 98564 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<cstdio>
#include<algorithm>
#include<vector>
#define SZ 1048576
#define N_ 601000
using namespace std;
const int INF = 2e9;
struct AA {
struct Tree {
long long M, L, R, LR;
}IT[SZ + SZ];
Tree Merge(Tree a, Tree b) {
long long L = max(max(a.M + b.L, a.L + b.LR),a.L);
long long R = max(max(b.M + a.R, b.R + a.LR),b.R);
long long LR = max(max(a.LR,b.LR),max(a.R + b.L, a.LR + b.LR));
long long M = max(a.M + b.M, a.L + b.R);
Tree ret = { M,L,R,LR };
return ret;
}
void Make(int a, long long l, long long r) {
//printf("%d %lld %lld\n", a, l, r);
a += SZ;
IT[a] = { 0, l, -r, l - r };
while (a != 1) {
a >>= 1;
IT[a] = Merge(IT[a * 2], IT[a * 2 + 1]);
}
};
long long Get(int b, int e) {
b += SZ, e += SZ;
컴파일 시 표준 에러 (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... |