Advertisement
Guest User

Untitled

a guest
Feb 24th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. INT main()
  4. {
  5.     LONG LONG m,n,x,y;
  6.     cin >> n >> m >> x >> y;
  7.     LONG LONG a = (x - 1) * m;
  8.     IF(x % 2 != 0){
  9.         a = a + y - 1;
  10.     }
  11.     ELSE{
  12.         a = a + m - y;
  13.     }
  14.     cout << a;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement