Queen Move
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
There is a queen on the chessboard of size . How many squares does the queen attack?
Input
Four positive integers: the size of the chessboard and and the queen's coordinates and .
Output
Print the number of squares the queen attacks.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 1K
Acceptance rate 44%