# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
77365 | tmwilliamlin168 | Bulldozer (JOI17_bulldozer) | C++14 | 911 ms | 94584 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int mxN=2e3;
int n, p[mxN], l[mxN];
ll x[mxN], y[mxN], w[mxN], ans;
array<ll, 4> st[1<<12];
array<ll, 6> ss[mxN*(mxN-1)/2];
void upd(int l1, ll x, int i=1, int l2=0, int r2=n-1) {
if(l2==r2) {
st[i]={x, max(x, 0ll), max(x, 0ll), max(x, 0ll)};
return;
}
int m2=(l2+r2)/2;
if(l1<=m2)
upd(l1, x, 2*i, l2, m2);
else
upd(l1, x, 2*i+1, m2+1, r2);
st[i]={st[2*i][0]+st[2*i+1][0], max(st[2*i][1], st[2*i][0]+st[2*i+1][1]), max(st[2*i+1][2], st[2*i+1][0]+st[2*i][2]), max({st[2*i][3], st[2*i+1][3], st[2*i][2]+st[2*i+1][1]})};
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> n;
for(int i=0; i<n; ++i) {
컴파일 시 표준 에러 (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... |