This documentation is automatically generated by competitive-verifier/competitive-verifier
// competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/range_kth_smallest
#include <bits/stdc++.h>
#include <locale>
#include "../structure/wavelet/wavelet-matrix.hpp"
using namespace std;
#ifdef LOCAL
#include "copypaste/debug.h"
#else
#define debug(...) 42
#endif
struct fast_ios {
fast_ios() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(10);
};
} fast_ios_;
int main() {
#ifdef LOCAL
freopen("./data.in", "r", stdin);
#endif
int n, q;
cin >> n >> q;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
WaveletMatrix<int> wm(a);
for (int i = 0; i < q; i++) {
int l, r, k;
cin >> l >> r >> k;
cout << wm.quantile(k, l, r) << endl;
}
return 0;
}
Traceback (most recent call last):
File "/home/runner/.local/lib/python3.12/site-packages/competitive_verifier/oj_resolve/resolver.py", line 181, in resolve
bundled_code = language.bundle(path, basedir=basedir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/.local/lib/python3.12/site-packages/competitive_verifier/oj/verify/languages/cplusplus.py", line 252, in bundle
bundler.update(path)
File "/home/runner/.local/lib/python3.12/site-packages/competitive_verifier/oj/verify/languages/cplusplus_bundle.py", line 477, in update
raise BundleErrorAt(
competitive_verifier.oj.verify.languages.cplusplus_bundle.BundleErrorAt: test/yosupo-range-kth-smallest.test.cpp: line 11: unable to process #include in #if / #ifdef / #ifndef other than include guards
Env | Name | Status | Elapsed | Memory |
---|---|---|---|---|
g++ | all_zero_00 |
![]() |
6 ms | 4 MB |
g++ | dense_large_a_00 |
![]() |
258 ms | 4 MB |
g++ | dense_small_a_00 |
![]() |
196 ms | 3 MB |
g++ | example_00 |
![]() |
5 ms | 4 MB |
g++ | max_random_00 |
![]() |
439 ms | 7 MB |
g++ | max_random_01 |
![]() |
478 ms | 7 MB |
g++ | max_random_02 |
![]() |
457 ms | 7 MB |
g++ | max_random_03 |
![]() |
447 ms | 7 MB |
g++ | max_random_04 |
![]() |
464 ms | 7 MB |
g++ | random_00 |
![]() |
321 ms | 6 MB |
g++ | random_01 |
![]() |
325 ms | 6 MB |
g++ | random_02 |
![]() |
219 ms | 4 MB |
g++ | random_03 |
![]() |
94 ms | 6 MB |
g++ | random_04 |
![]() |
154 ms | 4 MB |
g++ | small_00 |
![]() |
6 ms | 4 MB |
g++ | small_01 |
![]() |
5 ms | 4 MB |
g++ | small_02 |
![]() |
5 ms | 4 MB |
g++ | small_03 |
![]() |
5 ms | 4 MB |
g++ | small_04 |
![]() |
6 ms | 4 MB |
g++ | small_05 |
![]() |
5 ms | 4 MB |
g++ | small_06 |
![]() |
5 ms | 3 MB |
g++ | small_07 |
![]() |
5 ms | 4 MB |
g++ | small_08 |
![]() |
5 ms | 4 MB |
g++ | small_09 |
![]() |
5 ms | 4 MB |