# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
941458 | TAhmed33 | Two Currencies (JOI23_currencies) | C++98 | 1841 ms | 66952 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 1e5 + 25;
#define mid ((l + r) >> 1)
#define tl (node + 1)
#define tr (node + 2 * (mid - l + 1))
struct SegmentTree {
ll tree[MAXN << 1];
void init () {
for (int i = 1; i < MAXN; i++) tree[i] = 0;
}
void update (ll pos, ll val) {
for (; pos < MAXN; pos += pos & (-pos)) tree[pos] += val;
}
ll get (ll x) {
ll sum = 0;
for (; x; x -= x & (-x)) sum += tree[x];
return sum;
}
ll get (ll l, ll r) {
return get(r) - get(l - 1);
}
} cur, cur3;
vector <int> adj[MAXN];
int n, m, q;
pair <ll, ll> dd[MAXN];
array <ll, 5> queries[MAXN];
ll ans[MAXN];
ll low[MAXN], high[MAXN];
# | 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... |