# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
102679 | ihdignite | Cake 3 (JOI19_cake3) | C++14 | 1014 ms | 10592 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int mxN=2e5;
int n, m, p[mxN];
array<ll, 2> a[mxN], q[mxN], ft[mxN+1];
ll ans=-1e18;
array<ll, 2> operator+(array<ll, 2> a, array<ll, 2> b) {
return {a[0]+b[0], a[1]+b[1]};
}
void upd(int i, array<ll, 2> x) {
for(++i; i<=n; i+=i&-i)
ft[i]=ft[i]+x;
}
ll sk(int k) {
array<ll, 2> r{};
for(int i=17, x=0; ~i; --i) {
if(x+(1<<i)<=n&&(r+ft[x+(1<<i)])[1]<=k) {
x+=1<<i;
r=r+ft[x];
}
}
return r[0];
}
컴파일 시 표준 에러 (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... |