CodeForces 408A 手速题

//CodeForces 408A

 1 #include "iostream"
 2 #include "cstdio"
 3 #include "cstring"
 4 #include "algorithm"
 5 using namespace std;
 6 int n, k[110], tmp, res = 0x3f3f3f3f;
 7 
 8 int main()
 9 {
10     int i, j, ans;
11     scanf("%d", &n);
12     for(i = 1; i <= n; ++i)
13         scanf("%d", &k[i]);
14     for(i = 1; i <= n; ++i) {
15         tmp = 0;
16         for(j = 1; j <= k[i]; ++j) {
17             scanf("%d", &ans);
18             tmp += ans * 5 + 15;
19         }
20         res = min(tmp, res);
21     }
22     printf("%d\n", res);
23 }

 

posted @ 2015-02-24 23:57  AC_Phoenix  阅读(264)  评论(0编辑  收藏  举报