제출 #412398

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
4123982021-05-26 20:02:54aryan12Sterilizing Spray (JOI15_sterilizing)C++17
15 / 100
5086 ms6092 KiB
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 1e5 + 5;
int seg[N * 4];
int a[N], k;
void Build(int l, int r, int pos) {
if(l == r) {
seg[pos] = a[l];
return;
}
int mid = (l + r) >> 1;
Build(l, mid, pos * 2);
Build(mid + 1, r, pos * 2 + 1);
seg[pos] = seg[pos * 2] + seg[pos * 2 + 1];
}
void Update(int l, int r, int pos, int qidx, int qval) {
if(l == r) {
seg[pos] = qval;
return;
}
int mid = (l + r) >> 1;
if(mid >= qidx) {
Update(l, mid, pos * 2, qidx, qval);
}
else {
Update(mid + 1, r, pos * 2 + 1, qidx, qval);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...