# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
747898 | Sami_Massah | Bubble Sort 2 (JOI18_bubblesort2) | C++17 | 3778 ms | 103132 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 12, inf = 1e8;
int n, m, len, num[maxn * 4], mx[maxn * 4];
vector <int> ans;
vector <pair<int, int>> pos;
map <pair<int, int>, int> cnv;
void update_tree(int l, int r, int u, int k, int L = 0, int R = len){
if(r < L || R < l)
return;
if(l <= L && R <= r){
num[u] += k;
mx[u] += k;
return;
}
int mid = (L + R) / 2;
update_tree(l, r, u * 2, k, L, mid);
update_tree(l, r, u * 2 + 1, k, mid + 1, R);
mx[u] = max(mx[u * 2], mx[u * 2 + 1]) + num[u];
}
vector <int> countScans(vector <int> a, vector <int> y, vector <int> x){
n = a.size();
m = x.size();
for(int i = 0; i < m; i++)
pos.push_back(make_pair(x[i], y[i]));
# | 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... |