# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
698243 | Kahou | Abracadabra (CEOI22_abracadabra) | C++14 | 583 ms | 47276 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
/* In the name of God, aka Allah */
// Believe me - Takeshi Abo
#include<bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define endl '\n'
#define mk make_pair
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int N = 2e5 + 50, M = 1e6 + 50, LG = 20;
int n, q, par[N], out[M];
vector<pii> vc[N];
int p[N], pp[N];
int fen[N];
void upd(int i, int x) {
for (; i <= n; i += i&-i) fen[i] += x;
}
int get(int i) {
int out = 0;
for (; i > 0; i -= i&-i) out += fen[i];
return out;
}
int getpos(int x) {
int pos = 0;
for (int k = LG-1; k >= 0; k--) {
if (pos+(1<<k) <= n && fen[pos+(1<<k)] < 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... |