| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 135843 | 邹金行 | 最大值与最小值的差 | C++ | Compile Error | 0 MS | 0 KB | 255 | 2025-11-08 15:29:38 |
#include<bits/stdc++.h> using namespace std; int main(){ int m; cin>>m; int max=,min=0; int a[m]; for(int i=0;i<m;i++){ cin>>a[i]; if(a[i]<min){ min=a[i]; } if(a[i]>max){ max=a[i]; } } cout<<max-min; return 0; }
Main.cc: In function 'int main()':
Main.cc:6:10: error: expected primary-expression before ',' token
int max=,min=0;
^
Main.cc:10:11: error: invalid operands of types 'int' and '' to binary 'operator<'
if(a[i]' to binary 'operator-'
cout<