# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
206457 | GioChkhaidze | Bubble Sort 2 (JOI18_bubblesort2) | C++14 | 1783 ms | 72060 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "bubblesort2.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
#define ll long long
#define pb push_back
#define F first
#define S second
using namespace std;
const int N=5e5+5;
int n,q,Xx,Yy,L,R,dl,S,a[N],pos[N],x[N],inf=-1e9;
vector < int > answer;
vector < pair < pair < int , int > , pair < bool , int > > > s;
typedef struct { int x; int add; } res;
res v[8*N];
inline void Shift(Tree) {
if (!v[h].add) return ;
v[(h<<1)].x+=v[h].add;
v[((h<<1)|1)].x+=v[h].add;
v[(h<<1)].add+=v[h].add;
v[((h<<1)|1)].add+=v[h].add;
v[h].add=0;
}
void Upd(Tree) {
if (R<l || r<L) return ;
if (L<=l && r<=R) { v[h].add+=dl; v[h].x+=dl; return ; }
Shift(h,l,r);
# | 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... |