Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
121827 毛靖平 二维数组的最大值与最小值 C++ Wrong Answer 1 MS 268 KB 471 2025-06-08 15:05:19

Tests(1/2):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a,r=1000,h=0; cin>>a; int b[a][a]; for(int i=0;i<a;i++){ for(int j=0;j<a;j++) cin>>b[i][j]; } for(int i=0;i<a;i++){ for(int j=0;j<a;j++){ if(b[i][j]<r){ r=b[i][j]; } } } for(int i=0;i<a;i++){ for(int j=0;j<3;j++){ if(b[i][j]>h){ h=b[i][j]; } } } cout<<r<<" "<<h; return 0; }


Run Info:

------Input------
4 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
------Answer-----
1 16
------Your output-----
1 15