# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
14089 | paulsohn | 버블 정렬 (OJUZ10_bubblesort) | C++98 | 91 ms | 7840 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<cstdio>
#include<vector>
#include<algorithm>
#define B 131072
using namespace std;
int N,K;
struct key{
int n, k, o;
key(){}
key(int n){this->n=n; k=0; o=0;}
} inp[100010];
int kw[100010], bit[262144];
vector<key> pk, npk;
bool ocmp(key a, key b){ return a.o<b.o; }
bool ncmp(key a, key b){ return a.n<b.n; }
int getsum(int x, int y){ //[x,y]의 합을 구한다
if(x==y) return bit[x];
if(x>y) return 0;
int sum=0,X=x>>1,Y=y>>1;
if(x&1){ ++X; sum+=bit[x]; }
if(!(y&1)){ --Y; sum+=bit[y]; }
return sum+getsum(X,Y);
}
void add(int 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... |