提交时间:2024-03-21 19:25:19

运行 ID: 91441

#include <algorithm> #include <iostream> #include <string> using namespace std; int sum[105]; int main() { int a, b; cin >> a >> b; for (int i = 1; i <= a; i++) { for (int j = 1; j <= b; j++) { int x; cin >> x; sum[i] += x; } } int maxn = *max_element(sum + 1, sum + 1 + a); for (int i = 1; i <= a; i++) { if (sum[i] == maxn) cout << i << endl; } return 0; }