Now there is a game called thenew man down 100th floor. The rules of this game is:
1. At first you are atthe1st floor. And the floor moves up. Of course you
can choose which part you will stay inthefirsttime.
2. Every floor is divided into M parts. You can only walk ina direction (left
orright). And you can jump tothe next floor inany part, however if you are now
in part “y”, you can only jump to part “y” inthe next floor! (1<=y<=M)
3. There are jags ontheceils, soyoucanonlymoveatmostTpartseachfloor.4. Each part has a score. And the score is thesumofthe parts’ score sum you
passed by.
Now we want to know after you getthe100th floor, what’s the highest score you can
get.
【Input】
The firstlineofeachcase has fourinteger N, M, X, T(1<=N<=100, 1<=M<=10000,
1<=X, T<=M). N indicates thenumberof layers; M indicates thenumberof parts. At
first you are inthe X-th part. You can move at most T parts in every floor in only
one direction.
Followed N lines, eachline has M integers indicating the score. (-500<=score<=500)
HDU-4347-One hundred layer-dp-单调队列优化【Description】 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 mo...