Now there is a game called the new man down 100th floor. The rules of this game is: 1. At first you are at the 1st floor. And the floor moves up. Of course you can choose which part you will stay in the first time. 2. Every floor is divided into M parts. You can only walk in a direction (left or right). And you can jump to the next floor in any part, however if you are now in part “y”, you can only jump to part “y” in the next floor! (1<=y<=M) 3. There are jags on the ceils, so you can only move at most T parts each floor. 4. Each part has a score. And the score is the sum of the parts’ score sum you passed by. Now we want to know after you get the 100th floor, what’s the highest score you can get.
输入解释
The first line of each case has four integer N, M, X, T(1<=N<=100, 1<=M<=10000, 1<=X, T<=M). N indicates the number of layers; M indicates the number of parts. At first you are in the X-th part. You can move at most T parts in every floor in only one direction. Followed N lines, each line has M integers indicating the score. (-500<=score<=500)