# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
667807 | Baytoro | 벽 (IOI14_wall) | C++17 | 542 ms | 77388 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "bits/stdc++.h"
//#include "grader.cpp"
#include "wall.h"
using namespace std;
//#define int long long
#define fr first
#define sc second
const int INF=1e9+17,mod=1e9+7;
const int N=2e6+5;
pair<int,int> st[4*N];
int ans[N];
pair<int,int> f(pair<int,int> a, pair<int,int> b){
if(a.sc<b.fr)
return {a.sc,a.sc};
if(a.fr>b.sc)
return {a.fr,a.fr};
return {max(a.fr,b.fr),min(a.sc,b.sc)};
}
void push(int x){
if(st[x]!=make_pair(-INF,INF)){
st[2*x]=f(st[x],st[2*x]);
st[2*x+1]=f(st[x],st[2*x+1]);
st[x]={-INF,INF};
}
}
void update(int x, int l, int r, int lx, int rx, pair<int,int> v){
if(l>rx || r<lx) return;
if(lx<=l && r<=rx){
st[x]=f(v,st[x]);
return;
# | 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... |