# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1160597 | Newtonabc | Bubble Sort 2 (JOI18_bubblesort2) | C++20 | 25 ms | 25412 KiB |
#include "bubblesort2.h"
#include<bits/stdc++.h>
using namespace std;
const int N=1<<21;
struct stree{
vector<int> lz,s,arr;
int sz;
void init(int n){
lz.resize(n,0);
s.resize(n,0);
arr.resize(n,0);
}
void pushlz(int l,int r,int idx){
if(!lz[idx]) return;
s[idx]+=lz[idx];
if(l!=r) lz[idx*2]+=lz[idx],lz[idx*2+1]+=lz[idx];
lz[idx]=0;
}
void build(int l,int r,int idx){
if(l==r){
s[idx]=arr[l];
return;
}
int m=(l+r)/2;
build(l,m,idx*2);
build(m+1,r,idx*2+1);
s[idx]=max(s[idx*2],s[idx*2+1]);
}
void update(int l,int r,int idx,int a,int b,int val){
pushlz(l,r,idx);
# | 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... |