CSP-201909-1-小明种苹果
#include <iostream>
using namespace std;
int main()
{
long long sumApple = 0, maxNum = 0, maxAppleNum = 0, n, m;
cin >> n >> m;
for (long long i = 0; i < n; i++)
{
long long appleNum, delta = 0;
cin >> appleNum;
for (long long j = 0; j < m; j++)
{
long long num;
cin >> num;
delta += num;
}
if (delta < maxAppleNum)
{
maxAppleNum = delta;
maxNum = i + 1;
}
sumApple += (appleNum + delta);
}
cout << sumApple << " " << maxNum << " " << abs(maxAppleNum);
return 0;
}