Codeforces Beta Round 94 (Div. 2 Only)
E
Games with Rectangle
Codeforces
未评级
原题
← D→
翻译中…

In this task Anna and Maria play the following game. Initially they have a checkered piece of paper with a painted $*n* × *m*$ rectangle (only the border, no filling). Anna and Maria move in turns and Anna starts. During each move one should paint inside the last-painted rectangle a new lesser rectangle (along the grid lines). The new rectangle should have no common points with the previous one. Note that when we paint a rectangle, we always paint only the border, the rectangles aren't filled.

翻译中…

Nobody wins the game — Anna and Maria simply play until they have done $*k*$ moves in total. Count the number of different ways to play this game.

翻译中…

Input

翻译中…

The first and only line contains three integers: $*n*, *m*, *k*$ ($1 ≤ *n*, *m*, *k* ≤ 1000$).

翻译中…

Output

翻译中…

Print the single number — the number of the ways to play the game. As this number can be very big, print the value modulo $1000000007$ ($10^{9} + 7$).

翻译中…

Note

翻译中…

Two ways to play the game are considered different if the final pictures are different. In other words, if one way contains a rectangle that is not contained in the other way.

翻译中…

In the first sample Anna, who performs her first and only move, has only one possible action plan — insert a $1 × 1$ square inside the given $3 × 3$ square.

翻译中…

In the second sample Anna has as much as 9 variants: 4 ways to paint a $1 × 1$ square, 2 ways to insert a $1 × 2$ rectangle vertically, 2 more ways to insert it horizontally and one more way is to insert a $2 × 2$ square.

翻译中…

样例

Input #1
3 3 1
Output #1
1
InputCopy OutputCopy
Input #2
4 4 1
Output #2
9
InputCopy OutputCopy
Input #3
6 7 2
Output #3
75
InputCopy OutputCopy
题目信息
题号
129E
时间限制
2 s
内存限制
256 MB

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。