# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1117559 | patgra | Bubble Sort 2 (JOI18_bubblesort2) | C++17 | 31 ms | 14928 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "bubblesort2.h"
#define rep(a,b,c) for(auto a = (b); a != (c); a++)
#define repD(a,b,c) for(auto a = (b); a != (c); a--)
#define repIn(a, b) for(auto& a : (b))
#define repIn2(a, b, c) for(auto& [a, b] : (c))
#define ll long long
constexpr bool dbg = false;
#define DEBUG if constexpr(dbg)
#define DC DEBUG std::cerr
#define eol std::endl
constexpr ll maxn = 5e5 + 7, treeBase = 1 << 20, inf = 1e18 + 7;
std::map<std::pair<int, int>, int> map;
int n, q;
ll tree[2 * treeBase], lazy[2 * treeBase];
void fixNode(int v) {
// DC << "Fixin " << v << " -> ";
tree[v] = std::max(tree[2 * v] + lazy[2 * v], tree[2 * v + 1] + lazy[2 * v + 1]);
// DC << tree[v] << eol;
}
void add(int l, int r, ll x) {
DC << "add " << l << ' ' << r << ' ' << x << eol;
l += treeBase; r += treeBase;
lazy[l] += x;
if (l != r) lazy[r] += x;
# | 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... |