为啥只有50分?

18618326610 2024-08-09 14:13:36 4

#include <bits/stdc++.h> using namespace std; int main() { int x, y, count = 0, max_h, a[10][10]; for (int i = 1; i <= 5; i++) { for (int j = 1; j <= 5; j++) { cin >> a[i][j]; } } for (int i = 1; i <= 5; i++) { max_h = a[i][1]; for (int j = 1; j <= 5; j++) { if (max_h <= a[i][j]) { x = i; y = j; } } if (a[x][y] <= a[1][y] && a[x][y] <= a[2][y] && a[x][y] <= a[3][y] && a[x][y] <= a[4][y] && a[x][y] <= a[5][y]) { cout << x << " " << y << " " << a[x][y]; count++; } } if (count == 0) { cout << "not found"; } return 0; }

{{ vote && vote.total.up }}

共 1 条回复

root 站长

你自己找到问题了哈,恭喜又进步了!