# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
754942 | pcc | Fire (JOI20_ho_t5) | C++14 | 735 ms | 103348 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pll pair<ll,ll>
#define fs first
#define sc second
#define int ll
const ll mxn = 4e5+10;
struct Seg{
pll segtree[mxn*4];
Seg(){
for(auto &i:segtree)i = {0,0};
}
void modify(int now,int l,int r,int s,int e,ll v){
if(l>=s&&e>=r){
segtree[now].sc += v;
return;
}
int mid = (l+r)>>1;
if(mid>=s)modify(now*2+1,l,mid,s,e,v);
if(mid<e)modify(now*2+2,mid+1,r,s,e,v);
segtree[now].fs =
segtree[now*2+1].fs+segtree[now*2+1].sc*(mid-l+1)+segtree[now*2+2].fs+segtree[now*2+2].sc*(r-mid);
}
ll getval(int now,int l,int r,int s,int e){
if(l>=s&&e>=r){
return segtree[now].fs+segtree[now].sc*(r-l+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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |