Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
125282 | 程诺 | 二维数组的最大值与最小值 | C++ | Wrong Answer | 1 MS | 268 KB | 337 | 2025-07-14 14:56:11 |
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int a[n][n]; int max = a[0][0],min = a[0][0]; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cin>>a[i][j]; if(a[i][j]>max){ max = a[i][j]; } if(a[i][j]<min){ min = a[i][j]; } } } cout<<min<<" "<<max; return 0; }
------Input------
4 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
------Answer-----
1 16
------Your output-----
-282262420 16