fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n, ans = 1e9;
  6. cin >> n;
  7.  
  8. for (int i = 0; i < n; i++) {
  9. int k, t = 0, x;
  10. cin >> k;
  11. for (int j = 0; j < k; j++) {
  12. cin >> x;
  13. t += x * 5 + 15;
  14. }
  15. ans = min(ans, t);
  16. }
  17.  
  18. cout << ans << endl;
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 5324KB
stdin
4
1 4 3 2
100
1 2 2 3
1 9 1
7 8
stdout
35