Submission #999829

#TimeUsernameProblemLanguageResultExecution timeMemory
999829UnforgettableplSweeping (JOI20_sweeping)C++17
1 / 100
18048 ms26060 KiB
#include <bits/stdc++.h> using namespace std; #define int long long int32_t main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int n,m,q; cin >> n >> m >> q; vector<pair<int,int>> dusts(m+1); for(int i=1;i<=m;i++)cin>>dusts[i].first>>dusts[i].second; for(int i=1;i<=q;i++){ int type;cin>>type; if(type==1){ int x;cin>>x; cout << dusts[x].first << ' ' << dusts[x].second << '\n'; } else if(type==2){ int l;cin>>l; for(int i=1;i<=m;i++)if(dusts[i].second<=l)dusts[i].first=max(dusts[i].first,n-l); } else if(type==3){ int l;cin>>l; for(int i=1;i<=m;i++)if(dusts[i].first<=l)dusts[i].second=max(dusts[i].second,n-l); } else { int x,y;cin>>x>>y; dusts.emplace_back(x,y); 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...