#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++;
}
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
604 KB |
Output is correct |
2 |
Correct |
2 ms |
348 KB |
Output is correct |
3 |
Correct |
2 ms |
604 KB |
Output is correct |
4 |
Correct |
6 ms |
600 KB |
Output is correct |
5 |
Correct |
15 ms |
348 KB |
Output is correct |
6 |
Correct |
4 ms |
344 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
18048 ms |
26060 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
18002 ms |
20128 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
18002 ms |
20128 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
604 KB |
Output is correct |
2 |
Correct |
2 ms |
348 KB |
Output is correct |
3 |
Correct |
2 ms |
604 KB |
Output is correct |
4 |
Correct |
6 ms |
600 KB |
Output is correct |
5 |
Correct |
15 ms |
348 KB |
Output is correct |
6 |
Correct |
4 ms |
344 KB |
Output is correct |
7 |
Execution timed out |
18048 ms |
26060 KB |
Time limit exceeded |
8 |
Halted |
0 ms |
0 KB |
- |