# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
501388 | zhougz | 역사적 조사 (JOI14_historical) | C++17 | 1039 ms | 7772 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.
/**
* author: zhougz
* created: 03/01/2022 10:55:06
**/
#include "bits/stdc++.h"
using namespace std;
int blk_sz;
struct query {
int l, r, idx;
bool operator<(const query &rhs) const {
return l / blk_sz != rhs.l / blk_sz ? l < rhs.l : (r < rhs.r) ^ ((l / blk_sz) & 1);
}
};
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
int n, q;
cin >> n >> q;
blk_sz = n / sqrt(q);
vector<int> arr(n);
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
vector<query> queries(q);
for (int i = 0; i < q; i++) {
# | 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... |