제출 #301627

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
3016272020-09-18 05:31:51maximath_1식물 비교 (IOI20_plants)C++11
49 / 100
1668 ms30704 KiB
#include "plants.h"
#include <vector>
#include <iostream>
using namespace std;
#define ll long long
const ll inf = 1e18;
int n, arr[200005];
vector<int> r;
pair<ll, int> st[200005 * 4][2];
void build(int nd, int cl, int cr, int tp){
st[nd][tp] = {0, cl};
if(cl != cr){
build(nd * 2, cl, (cl + cr) / 2, tp);
build(nd * 2 + 1, (cl + cr) / 2 + 1, cr, tp);
}
}
ll lz[200005 * 4][2];
void prop(int nd, int cl, int cr, int tp){
if(lz[nd][tp]){
st[nd][tp].first += lz[nd][tp];
if(cl != cr){
lz[nd * 2][tp] += lz[nd][tp];
lz[nd * 2 + 1][tp] += lz[nd][tp];
}
lz[nd][tp] = 0;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...