Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
93790 何思佳 二维数组的最大值与最小值 C++ Wrong Answer 1 MS 264 KB 315 2024-10-19 11:20:10

Tests(0/2):


Code:

#include<bits/stdc++.h> using namespace std; int a[10][10]; int main(){ int mx=-2e9,mn=2e9; int n; cin>>n; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cin>>a[i][j]; if(a[i][j]>mx){ mx=a[i][j]; } if(a[i][j]<mn){ mn=a[i][j]; } } } cout<<mx<<" "<<mx; return 0; }


Run Info:

------Input------
3 1 2 3 4 5 6 7 8 9
------Answer-----
1 9
------Your output-----
9 9