Submission #321874

#TimeUsernameProblemLanguageResultExecution timeMemory
321874techiehere08Lasers (NOI19_lasers)C++14
0 / 100
50 ms1004 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; } if(max % 2) max--; 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...