Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- INT main()
- {
- LONG LONG m,n,x,y;
- cin >> n >> m >> x >> y;
- LONG LONG a = (x - 1) * m;
- IF(x % 2 != 0){
- a = a + y - 1;
- }
- ELSE{
- a = a + m - y;
- }
- cout << a;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement