# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
965666 | IBory | Selling RNA Strands (JOI16_selling_rna) | C++17 | 150 ms | 29284 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 pii pair<int, int>
using namespace std;
const int MAX = 100007;
string S[MAX], RS[MAX];
int Y[MAX], ans[MAX];
pii RY[MAX];
vector<int> RX[MAX];
struct BIT {
int T[MAX];
void Update(int i) {
for(; i < MAX; i += i & -i) T[i]++;
}
int Query(int L, int R) {
int ret = 0; L--;
for (; R; R -= R & -R) ret += T[R];
for (; L; L -= L & -L) ret -= T[L];
return ret;
}
} T;
pii GetRange(int N, string* S, string P) {
pii ret = {0, 0};
ret.first = (lower_bound(S + 1, S + N + 1, P) - S) - 1;
P.back()++;
ret.second = (lower_bound(S + 1, S + N + 1, P) - S) - 1;
return ret;
}
# | 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... |