Cow Hopscotch (Gold)
의견: 0
Farmer John's cows play a variant of Hopscotch on an R by C grid (2 <= R <= 750, 2 <= C <= 750), where each square is labeled with an integer in the range 1..K (1 <= K <= R*C). Cows start in the top-left square and move to the bottom-right square by a sequence of jumps, where a jump is valid if and only if:
1) You are jumping to a square labeled with a different integer than your current square,
2) The square you are jumping to is at least one row below the current square, and
3) The square you are jumping to is at least one column to the right of the current square.
Please help the cows compute the number of different possible sequences of valid jumps from the top-left square to the bottom-right square.
Line 1: R, C, and K. The next R lines each contain C integers, each in the range 1..K.
The number of different ways one can jump from the top-left square to the bottom-right square, mod 1000000007.
hopscotch.inhopscotch.out4 4 4
1 1 1 1
1 3 2 1
1 2 4 1
1 1 1 15riseoj 작성
출처 올림피아드 > USACO > 2014-2015 > February > Gold
평가 및 의견
Cow Hopscotch (Gold)
아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.
풀이 제출
Cow Hopscotch (Gold)