#include<bits/stdc++.h>
#define pb push_back
#define fi first
#define se second
#define mp make_pair
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef long double ld;
template <typename T> bool chkmin(T &x,T y){return x>y?x=y,1:0;}
template <typename T> bool chkmax(T &x,T y){return x<y?x=y,1:0;}
ll readint(){
ll x=0,f=1; char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
return x*f;
}
int n,m,q;
int x[1500005],y[1500005];
int main(){
n=readint();
m=readint();
q=readint();
for(int i=1;i<=m;i++){
x[i]=readint();
y[i]=readint();
}
while(q--){
int t=readint();
if(t==1){
int i=readint();
printf("%d %d\n",x[i],y[i]);
}
if(t==2){
int l=readint();
for(int i=1;i<=m;i++){
if(x[i]<=n-l&&y[i]<=l) x[i]=n-l;
}
}
if(t==3){
int l=readint();
for(int i=1;i<=m;i++){
if(x[i]<=l&&y[i]<=n-l) y[i]=n-l;
}
}
if(t==4){
++m;
x[m]=readint();
y[m]=readint();
}
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
2652 KB |
Output is correct |
2 |
Correct |
3 ms |
2396 KB |
Output is correct |
3 |
Correct |
1 ms |
2396 KB |
Output is correct |
4 |
Correct |
8 ms |
2652 KB |
Output is correct |
5 |
Correct |
20 ms |
2556 KB |
Output is correct |
6 |
Correct |
4 ms |
2392 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
18028 ms |
12400 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
18050 ms |
14172 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
18050 ms |
14172 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
2652 KB |
Output is correct |
2 |
Correct |
3 ms |
2396 KB |
Output is correct |
3 |
Correct |
1 ms |
2396 KB |
Output is correct |
4 |
Correct |
8 ms |
2652 KB |
Output is correct |
5 |
Correct |
20 ms |
2556 KB |
Output is correct |
6 |
Correct |
4 ms |
2392 KB |
Output is correct |
7 |
Execution timed out |
18028 ms |
12400 KB |
Time limit exceeded |
8 |
Halted |
0 ms |
0 KB |
- |