Snake
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Write a program that prints an integer located at line x and column y of matrix n × m that is filled like a snake:
Input
Given the integers n, m, x, y (1 ≤ x ≤ n ≤ 50, 1 ≤ y ≤ m ≤ 50). Here n is number of matrix lines, m is number of matrix columns, x and y are the numbers of row and column of element to print.
Output
Print the element of line x and column y.
Examples
Input #1
Answer #1
Submissions 10K
Acceptance rate 53%