Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
125289 | 田子熙 | 二维数组的最大值与最小值 | C++ | Wrong Answer | 0 MS | 272 KB | 332 | 2025-07-14 15:04:47 |
#include<bits/stdc++.h>//<csterint> using namespace std; int a[3][3]; int main(){ long long min=9223372036854775807,max=0; for(int x=0;x<3;x++){ for(int j=0;j<3;j++){ cin>>a[x][j]; if(min>a[x][j]){ min=a[x][j]; } if(max<a[x][j]){ max=a[x][j]; } } } cout<<min<<" "<<max; return 0; }
------Input------
3 1 2 3 4 5 6 7 8 9
------Answer-----
1 9
------Your output-----
1 8