2024.3.17 【深知身在情长在 怅望江头江水声】
Sunday 二月初八
【LGR-179-Div.2】复旦勰码 3 月月赛 II & ZHYOI Round 4
T1 T431492 农场
//2024.3.17
//by white_ice
#include<bits/stdc++.h>
using namespace std;
#define itn long long
#define int long long
const int inf = 0x3f3f3f;
itn jntm(itn a,itn b){return a>b?a:b;}
int ngm (itn a,itn b){return a<b?a:b;}
int n;
itn xa,ya,xb,yb;
itn a = inf,b = -inf,c = -inf,d = inf;
signed main (){
cin >> n;
for (itn i=1;i<=n;i++){
cin >> xa >> ya >> xb >> yb;
a = ngm (a,ngm (xa,xb));
b = jntm(b,jntm(ya,yb));
c = jntm(c,jntm(xa,xb));
d = ngm (d,ngm (ya,yb));
}
int out = (a-c)*(b-d);
cout << abs(out);
return 0;
}
T2 T431493 线性变换
//2024.3.17
//by crossline white_ice
#include<bits/stdc++.h>
using namespace std;
#define itn long long
#define int long long
int t;
itn x,a,b;
signed main(){
cin >> t;
while (t--){
cin>>x>>a>>b;
if (a==0||x==0)
x = -b;
else {
if (b<=(a-1)*x)
x = x;
else{
if (a == 1)
x = x%b -b ;
else
while (x>=0)
x =x*a-b;
}
}
cout << x << '\n';
}
return 0;
}
T3不会一点,
T4直接不看(乐
T2少一个等于0特判卡一个小时(大丑