# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
354251 | valerikk | Trampoline (info1cup20_trampoline) | C++14 | 824 ms | 62952 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 = 2e5 + 7;
const int L = 20;
int R, C, n;
pair<int, int> green[N];
int a[N], b[N];
int go[L][N];
int main() {
#ifdef LOCAL
freopen("input.txt", "r", stdin);
#endif
ios::sync_with_stdio(false);
cin.tie(0);
cin >> R >> C >> n;
for (int i = 0; i < n; ++i)
cin >> green[i].second >> green[i].first;
green[n] = {C + 1, R + 1};
sort(green, green + n + 1);
for (int i = 0; i <= n; ++i)
a[i] = green[i].second, b[i] = green[i].first;
for (int i = 0; i <= n; ++i)
go[0][i] = n;
map<int, int> last;
for (int i = n - 1; i >= 0; --i) {
if (last.find(a[i] + 1) != last.end())
# | 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... |