Submission #321875

#TimeUsernameProblemLanguageResultExecution timeMemory
321875techiehere08Lasers (NOI19_lasers)C++14
24 / 100
297 ms6124 KiB
#include<bits/stdc++.h> using namespace std; int main(){ int l, r; cin >> l >> r; int ans = 0, max = 0; for(int i = 0; i < r; i++){ int n; cin >> n; int x, sum = 0; while(n--){ cin >> x; sum += x; } if(max < sum) max = sum; } ans = 2 * max - l; if(ans < 0) ans = 0; cout << ans << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...