제출 #331233

#제출 시각아이디문제언어결과실행 시간메모리
331233limabeans청소 (JOI20_sweeping)C++17
1 / 100
18075 ms15648 KiB
#include <bits/stdc++.h> using namespace std; template<typename T> void out(T x) { cout << x << endl; exit(0); } #define watch(x) cout << (#x) << " is " << (x) << endl using ll = long long; const int maxn = 1e6 + 5; int n,m,q; pair<int,int> P[maxn]; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin>>n>>m>>q; for (int i=1; i<=m; i++) { cin>>P[i].first>>P[i].second; } for (int z=1; z<=q; z++) { int op; cin>>op; if (op==4) { // add dust int x,y; cin>>x>>y; P[++m] = {x,y}; } else if (op==3) { // vertical int l; cin>>l; for (int i=1; i<=m; i++) { if (P[i].first<=l && P[i].second<=n-l) { P[i].second = n-l; } } } else if (op==2) { // horizontal int l; cin>>l; for (int i=1; i<=m; i++) { if (P[i].first<=n-l && P[i].second<=l) { P[i].first = n-l; } } } else if (op==1) { int i; cin>>i; cout<<P[i].first<<" "<<P[i].second<<"\n"; } } return 0; }
#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...