###### tags: `APCS` `c++` # 題解 zerojudge i428: 1. 巴士站牌 APCS ```cpp #include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int x1,x2,y1,y2,d; cin>>x1>>y1; n--; set<int>ans; while(n--){ cin>>x2>>y2; d=abs(x2-x1)+abs(y2-y1); ans.insert(d); x1=x2;y1=y2; } cout<<*(--ans.end())<<' '<<*ans.begin(); } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up