# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
166421 | GioChkhaidze | Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) | C++14 | 2311 ms | 129204 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define Tree int h,int l,int r
#define Left (h<<1),l,((l+r)>>1)
#define Right ((h<<1)|1),((l+r)>>1)+1,r
using namespace std;
const int N=2e6+1;
bool ANS[N];
int n,q,idx,val,L,R;
int w[N],a[N],b[N],c[N],Greater[N],v[4*N];
stack < int > st;
vector < int > Query[N];
void Upd(Tree) {
if (idx<l || r<idx) return;
if (l==idx && r==idx) { v[h]=val; return; }
Upd(Left),Upd(Right);
if (v[(h<<1)]>v[((h<<1)|1)]) v[h]=v[(h<<1)];
else v[h]=v[((h<<1)|1)];
}
int Get(Tree) {
if (r<L || R<l) return 0;
if (L<=l && r<=R) return v[h];
int x=Get(Left),y=Get(Right);
if (x<y) return y;
return x;
}
main () {
scanf("%d%d",&n,&q);
컴파일 시 표준 에러 (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |