QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#535671#9226. Game of Geniusesthangthang#RE 0ms0kbC++20666b2024-08-28 12:43:042024-08-28 12:43:04

Judging History

你现在查看的是最新测评结果

  • [2024-08-28 12:43:04]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:0kb
  • [2024-08-28 12:43:04]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

const int N = 55;

int n, a[N][N];

void solve(){
    cin >> n;
    for (int i = 1; i <= n; ++ i){
        for (int j = 1; j <= n; ++ j) cin >> a[i][j];
    }
    int mxR = 0, mnC = N * N;
    for (int i = 1; i <= n; ++ i){
        int C = 0, R = N * N;
        for (int j = 1; j <= n; ++ j){
            R = min(R, a[i][j]);
            C = max(C, a[j][i]);
        }
        mnC = min(mnC, C);
        mxR = max(mxR, R);
    }
    assert(mnC < mxR);
    cout << mxR;
}

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    solve();

    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Runtime Error

input:

3
1 4 9
8 4 2
7 5 7

output:


result: