Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
63281 李琥博 二维数组的最大值与最小值 C++ Wrong Answer 1 MS 272 KB 315 2024-01-07 10:37:53

Tests(0/2):


Code:

#include<iostream> using namespace std; int main() { int n,d=-999999999,x=99999999999; cin>>n; int a[n][n]; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cin>>a[i][j]; if(a[i][j]>d){ d=a[i][j]; } else if(a[i][j]<x){ x=a[i][j]; } } } cout<<x<<" "<<d; return 0; }


Run Info:

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