# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
58928 | khohko | Bubble Sort 2 (JOI18_bubblesort2) | C++17 | 6615 ms | 204384 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
#include "bubblesort2.h"
using namespace std;
#define ll int
#define fr first
#define sc second
#define pb push_back
#define ARRS ((ll)(1e6+100))
#define MAX ((ll)(1e9+100))
ll fw[ARRS+100];
void add(ll i,ll x){
i=ARRS-i;
while(i<=ARRS+10){
fw[i]+=x;
i+=i&-i;
}
}
ll quer(ll i){
i=ARRS-i;
ll p=0;
while(i>0){
p+=fw[i];
i-=i&-i;
}
return p;
}
Compilation message (stderr)
# | 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... |