# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
598045 | LIF | Arranging Shoes (IOI19_shoes) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include<vector>
using namespace std;
int n;
int a[200005];
vector<int> v[300005];
long long int sum[300005];
bool vis[300005];
int lowbit(int x)
{
return x&(-x);
}
void add(int x,int val)
{
while(x<=n)
{
sum[x] +=val;
x+=lowbit(x);
}
}
long long int getsum(int x)
{
long long int ans = 0;
while(x>0)
{
ans += sum[x];
x-=lowbit(x);
}
return ans;
}