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;
#define ar array
#define sz(v) int(std::size(v))
using i64 = long long;
const int SIZE = 15e5;
int N, M, Q;
int X[SIZE], Y[SIZE];
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> N >> M >> Q;
for (int i = 0; i < M; i++) {
cin >> X[i] >> Y[i];
}
if (M <= 2000) {
while (Q--) {
int t;
cin >> t;
if (t == 1) {
int i;
cin >> i, i--;
cout << X[i] << ' ' << Y[i] << '\n';
} else if (t == 2) {
int l;
cin >> l;
for (int i = 0; i < M; i++) if (Y[i] <= l)
X[i] = max(X[i], N - l);
} else if (t == 3) {
int l;
cin >> l;
for (int i = 0; i < M; i++) if (X[i] <= l)
Y[i] = max(Y[i], N - l);
} else {
cin >> X[M] >> Y[M];
M++;
}
}
}
}
# | 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... |