Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int n,m,x,y,xsu,xjo,yjst,yjdr,ysst,ysdr;
- unsigned long long ysmaxim, yjmaxim,sol;
- int main()
- {
- cin>>x>>y>>n>>m;
- xsu=x;
- xjo=(n-x)+1;
- yjst=xjo+y-1;
- yjdr=xjo+(m-y);
- ysst=xsu+y-1;
- ysdr=xsu+(m-y);
- yjmaxim=max(yjst,yjdr);
- ysmaxim=max(ysst,ysdr);
- sol=max(yjmaxim,ysmaxim);
- cout<<sol;
- return 0;
- }
Add Comment
Please, Sign In to add comment