题目描述
Time Limit: 8 sec / Memory Limit: 64 MB
Example
Input
3 3 2
1 1
2 1 1
3 1 1 1
Output
8
输入格式
见题面
输出格式
见题面
样例输入
3 3 2
1 1
2 1 1
3 1 1 1
样例输出
8
Time Limit: 8 sec / Memory Limit: 64 MB
Example
Input
3 3 2
1 1
2 1 1
3 1 1 1
Output
8
见题面
见题面