Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
63663 夏轩淇 二维数组的最大值与最小值 C++ Compile Error 0 MS 0 KB 435 2024-01-19 16:43:13

Tests(0/0):


Code:

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


Run Info:

Main.cc:5:1: error: expected initializer before 'int'
 int main(){
 ^