# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
443166 | RGBB | 사탕 분배 (IOI21_candies) | C++17 | 2706 ms | 32100 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
typedef pair<int,int>pp;
typedef long long ll;
const int MAXN=200000;
int n,q;
ll sum,maxs[1<<19],mins[1<<19],lazy[1<<19];
vector<pp>query[MAXN];
void update(int a,int b,int c,int be,int en,int v){
if(lazy[c]!=0){
maxs[c]+=lazy[c];
mins[c]+=lazy[c];
if(a!=b){
lazy[2*c+1]+=lazy[c];
lazy[2*c+2]+=lazy[c];
}
lazy[c]=0;
}
if(a>b||a>en||b<be)return;
if(a>=be&&b<=en){
maxs[c]+=v;
mins[c]+=v;
if(a!=b){
lazy[2*c+1]+=v;
lazy[2*c+2]+=v;
}
return;
}
컴파일 시 표준 에러 (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... |