# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
586858 | JovanB | Tenis (COI19_tenis) | C++17 | 157 ms | 8028 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const int N = 100000;
struct Segment{
ll sum, mn, pos;
} seg[4*N+5];
int n;
void mrg(int node){
seg[node].sum = seg[node*2].sum + seg[node*2+1].sum;
seg[node].mn = min(seg[node*2].mn, seg[node*2].sum + seg[node*2+1].mn);
if(seg[node*2].sum + seg[node*2+1].mn == seg[node].mn) seg[node].pos = seg[node*2+1].pos;
else seg[node].pos = seg[node*2].pos;
}
void init(int node, int l, int r){
if(l == r){
seg[node].mn = -2*l;
seg[node].pos = l;
seg[node].sum = -2*l;
if(l == n) seg[node].mn = 0;
return;
}
int mid = (l+r)/2;
# | 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... |