1029 Array Cutting Score
Statement
Metadata
- 作者: 曹鹏
- 单位: Google
- 代码长度限制: 16 KB
- 时间限制: 400 ms
- 内存限制: 64 MB
Given an integer array of length
Input Specification
Each input file contains one test case. For each case, the first line contains two positive integers
Output Specification
Output the product of the scores of all the possible ways of array-cutting in a single line. Since the answer might be too large, output the result modulo 1000000007 (
Sample Input
Sample Output
Hint:
- The score of cut (5)(1 2 3 4) is
- The score of cut (5 1)(2 3 4) is
- The score of cut (5 1 2)(3 4) is
- The score of cut (5 1 2 3)(4) is
- The final result is
Last update: May 4, 2022