This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
#include <bits/stdc++.h>
using namespace std;
/*
20190925
csp试题1:小明种苹果
*/
int main() {
int n, m;
cin >> n >> m;
int f = 0, sum = 0, ma = 0;
for (int i = 1, a; i <= n; i++) {
cin >> a;
sum += a;
int ans = 0;
for (int j = 1, x; j <= m; j++) {
cin >> x;
ans += x;
}
ans = -ans;
sum -= ans;
if (ma < ans) ma = ans, f = i;
cout << sum << " " << f << " " << ma;