# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
537240 | surgutti | Martian DNA (BOI18_dna) | C++14 | 124 ms | 139472 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>
using namespace std;
const int N = 200'007;
int n, s, r, d[N], b[N], q[N];
int req[N], nxt_req[N];
int nxt[N], cur_req[N];
queue<int> last[N];
int main() {
ios::sync_with_stdio(false), cin.tie(nullptr);
cin >> n >> s >> r;
for (int i = 0; i < n; i++) {
cin >> d[i];
cur_req[i] = -1;
}
for (int i = 0; i < r; i++) {
cin >> b[i] >> q[i];
req[b[i]] = q[i];
}
for (int i = n - 1; i >= 0; i--) if (req[d[i]] > 0) {
# | 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... |