#include <cstring>
#include <string.h>
#include <iostream>
#include <stdio.h>
#define ll long long
#define PII pair<int, int>
#define MSI map<string,int>
#define TLE ios::sync_with_stdio(0),cin.tie(0)
#define mod 1000000007
const int INF = 0x3f3f3f3f;
using namespace std;
int M, N, a[1005][1005], m[1005], k = 0, P = 0, T = 0;
int main() {
TLE;
cin >> N >> M;
for (int i = 1; i <= N; i++) {
for (int j = 0; j <= M; j++) {
cin >> a[i][j];
if (j) {
a[i][0] += a[i][j];
m[i] -= a[i][j];
}
}
}
for (int i = 1; i <= N; i++) {
if (m[i] > P) {
P = m[i]; k = i;
}
T += a[i][0];
}
cout << T << " " << k << " " << P << endl;
}
CCF 201909-1 小明种苹果
最新推荐文章于 2023-11-24 22:06:51 发布