# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1172741 | manowo | Addk (eJOI21_addk) | C++20 | 2094 ms | 2892 KiB |
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int N = 2e5 + 2;
const int inf = 1e15;
const int mod = 1e9 + 7;
int T = 1, a[N], t[4 * N] , p[N];
void build(int v, int tl, int tr)
{
if (tl == tr)
{
t[v] = a[tl];
return;
}
int mid = (tl + tr) / 2;
build(v + v, tl, mid);
build(v + v + 1, mid + 1, tr);
t[v] = t[v + v] + t[v + v + 1];
}
void upd(int v, int tl, int tr, int pos, int x)
{
if (tl == tr)
{
t[v] = x;
return;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |