## [USACO FEB14]奶牛的十项全能

 Grade Open Time Friday, 19 September 2014, 10:08 am Discount 0.8 Time Discount Friday, 26 September 2014, 10:08 am Allow late Yes Close Time Friday, 26 September 2014, 10:08 am Input file deca.in Output file deca.out

### 【题目描述】

 event cow 1 2 3 1 5 1 7 2 2 2 4 3 4 2 1

### 【样例输入】


3 1
2 7 6
5 1 7
2 2 4
4 2 1



### 【样例输出】

17