Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
120184 | 谭思宸 | 两个数的最小距离 | C++ | Compile Error | 0 MS | 0 KB | 575 | 2025-05-24 11:45:47 |
# include<stdio.h> #include<iostream> #include<cmath> using namespace std; int main(){ int minn=1; int maxn=1; int a[1000][1000]; int n; cin>>n; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ cin>>a[i][j]; if(a[i][j]>=maxn){ maxn=a[i][j]; } else if(a[i][j]<minn){ minn=a[i][j]; } } } cout<<minn<<" "<<maxn; int n,m; int a[100][100]; int b[100][100]; int c[100][100]; cin>>n>>m; for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ cin>>a[i][j];
Main.cc: In function 'int main()': Main.cc:24:9: error: redeclaration of 'int n' int n,m; ^ Main.cc:10:5: note: 'int n' previously declared here int n; ^ Main.cc:25:15: error: conflicting declaration 'int a [100][100]' int a[100][100]; ^ Main.cc:9:5: note: previous declaration as 'int a [1000][1000]' int a[1000][1000]; ^ Main.cc:31:20: error: expected '}' at end of input cin>>a[i][j]; ^ Main.cc:31:20: error: expected '}' at end of input Main.cc:26:5: warning: unused variable 'b' [-Wunused-variable] int b[100][100]; ^ Main.cc:27:5: warning: unused variable 'c' [-Wunused-variable] int c[100][100]; ^ Main.cc:31:20: error: expected '}' at end of input cin>>a[i][j]; ^