# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
59588 | gusfring | Pinball (JOI14_pinball) | C++14 | 1092 ms | 165688 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<stdio.h>
#include<algorithm>
using namespace std;
typedef long long ll;
int n, m;
struct st {
ll mini[2] = { (ll)1e18,(ll)1e18 };
st *left=NULL, *right=NULL;
}tree;
void update(st *h, int l, int r, int g,ll x, int type) {
if (r < g || g < l) return;
h->mini[type] = min(h->mini[type], x);
if (l != r) {
if (!h->left) h->left = new st;
if (!h->right) h->right = new st;
update(h->left, l, (l + r) / 2, g, x, type);
update(h->right, (l + r) / 2+1,r, g, x, type);
}
}
ll query(st *h, int l, int r, int gl, int gr, int type) {
if (r < gl || gr < l) return 1e18;
if (gl <= l && r <= gr) return h->mini[type];
if (!h->left) h->left = new st;
if (!h->right) h->right = new st;
return min(query(h->left, l, (l + r) / 2, gl, gr, type),
query(h->right, (l + r) / 2 + 1, r, gl, gr, type));
컴파일 시 표준 에러 (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... |