This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |