Submission #894727

#TimeUsernameProblemLanguageResultExecution timeMemory
894727boxSweeping (JOI20_sweeping)C++17
1 / 100
88 ms16480 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...