# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
468437 | stefantaga | Pinball (JOI14_pinball) | C++14 | 219 ms | 19120 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef tuple<ll, ll, ll, ll> tpl;
const ll MXN = 3e5 + 10;
const ll MXS = MXN * 2;
const ll INF = 1e18;
ll n, m, k, ans;
ll A[MXN], B[MXN], C[MXN], D[MXN];
vector<ll> Num;
inline int GetId(ll x){
return lower_bound(Num.begin(), Num.end(), x) - Num.begin() + 1;
}
struct Segtree {
ll seg[MXS], lim;//lim as size
void init(){
lim = k + 1;
for(int i = lim << 1; -- i; ) seg[i] = INF;
}
void Upd(ll p, ll x){
p += lim;
while(p) seg[p] = min(seg[p], x), p >>= 1;
}
ll Get(ll l, ll r){
ll res = INF; l += lim, r += lim;
while(l <= r){
if((l & 1) == 1) res = min(res, seg[l]), l ++;
if((r & 1) == 0) res = min(res, seg[r]), r --;
l >>= 1, r >>= 1;
# | 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... |