제출 #1007707

#제출 시각아이디문제언어결과실행 시간메모리
1007707devariaotaLasers (NOI19_lasers)C++17
0 / 100
9 ms456 KiB
#include <bits/stdc++.h> using namespace std; #define int long long #define ld long double #define fi first #define se second #define pb push_back #define pii pair<int,int> #define piii pair<pair<int,int>,pair<int,int>> #define pip pair<int,pair<int,int>> signed main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n, q; cin >> n >> q; int val = 0; for(int i = 1; i <= q; i++){ int x; cin >> x; int tmp = 0; for(int i = 1; i <= x; i++){ int a; cin >> a; tmp += a; } val = max(val,tmp); } cout << val - (n - val + 1) + 1 << endl; }
#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...