# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
64197 | someone_aa | Election (BOI18_election) | C++17 | 1593 ms | 47128 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
using namespace std;
const int maxn = 500100;
vector<pair<int,int>>events[maxn];
int arr[maxn], answer[maxn], n, q;
struct node {
public:
int l, r;
int sum, minsuf;
} tree[4*maxn];
node mergef(node a, node b) {
node c;
c.l = a.l; c.r = b.r;
c.sum = a.sum + b.sum;
c.minsuf = min(b.minsuf, a.minsuf + b.sum);
return c;
}
void build(int li=1, int ri=n, int index=1) {
if(li == ri) {
tree[index].l = li; tree[index].r = ri;
tree[index].sum = arr[li];
tree[index].minsuf = min(0, arr[li]);
}
else {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |