# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
107389 | Noam527 | Land of the Rainbow Gold (APIO17_rainbow) | C++17 | 1332 ms | 118892 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.
#include <bits/stdc++.h>
#define CHECK cout << "ok" << endl
#define finish(x) return cout << x << endl, 0
typedef long long ll;
typedef long double ldb;
const int md = 1e9 + 7;
const ll inf = 1e18;
const int OO = 0;
const int OOO = 1;
using namespace std;
int countless(const vector<int> &a, int x) {
if (!a.size()) return 0;
int lo = 0, hi = (int)a.size() - 1, mid;
while (lo < hi) {
mid = (lo + hi) / 2;
if (x <= a[mid]) hi = mid;
else lo = mid + 1;
}
if (x > a[lo]) lo++;
return lo;
}
int between(const vector<int> &a, int lo, int hi) {
return countless(a, hi + 1) - countless(a, lo);
}
struct segtree {
int n;
vector<vector<int>> t;
segtree() {}
segtree(int sz) {
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |