QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#535672 | #9226. Game of Geniuses | thangthang# | RE | 0ms | 0kb | C++20 | 666b | 2024-08-28 12:43:34 | 2024-08-28 12:43:35 |
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