# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
996200 | IBory | Abracadabra (CEOI22_abracadabra) | C++17 | 850 ms | 65168 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define pii pair<int, int>
using namespace std;
const int SZ = 1 << 18;
int A[SZ], B[SZ], R[SZ], IB[SZ], ans[1000007];
struct Seg {
int T[SZ << 1];
void Update(int i, int v) {
T[i += SZ - 1] = v;
while (i >>= 1) T[i] = T[i * 2] + T[i * 2 + 1];
}
pii Query(int k) {
int sL = 1, sR = SZ, n = 1;
while (sL != sR) {
int mid = (sL + sR) >> 1;
if (k <= T[n * 2]) sR = mid, n = n * 2;
else sL = mid + 1, k -= T[n * 2], n = n * 2 + 1;
}
return {sL, k};
}
} T;
int main() {
ios::sync_with_stdio(0); cin.tie(0);
int N, Q;
cin >> N >> Q;
for (int i = 1; i <= N; ++i) cin >> A[i];
map<int, vector<pii>> P;
# | 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... |