Who can help me?
查看原帖
Who can help me?
533488
Immortal_Xiao楼主2022/11/4 18:14

All WA exepct #9ACAll \ WA \ exepct \ \# 9 AC

#include <bits/stdc++.h>
using namespace std;

int a[10][10];
int b[10][10];

int main()
{
    for (int i = 1; i <= 5; i++)
    {
        for (int j = 1; j <= 5; j++)
        {
            cin >> a[i][j];
        }
    }
    int num = -2147483648;
    int x, y;
    for (int i = 1; i <= 5; i++)
    {
        for (int j = 1; j <= 5; j++)
        {
            num = max(num, a[i][j]);
        }
        for (int j = 1; j <= 5; j++)
        {
            if (a[i][j] < num)
            {
                num = -2147483648;
                break;
            }
            y = j;
        }
        if (num != -2147483648)
        {
            x = i;
        }
    }
    if (num != -2147483648)
    {
        cout << x << ' ' << y << ' ' << num << endl;
        return 0;
    }
    cout << "not found" << endl;
    return 0;
}
2022/11/4 18:14
加载中...