| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 73226 | 袁嘉蔓 | 最大值与最小值的差 | C++ | Compile Error | 0 MS | 0 KB | 262 | 2024-05-18 12:03:52 |
include<iostream> using namespace std; int main() { int a; cin>>a; int b[a],d=0,e=10000; for(int i=0;i<a;i++) { cin>>b[i]; } for(int c=0;c<a;c++) { if(b[c]>d) d=b[c]; if(b[c]<e) e=b[c]; } cout<<d-e; return 0; }
Main.cc:1:1: error: 'include' does not name a type
include
^
Main.cc: In function 'int main()':
Main.cc:7:10: error: 'cin' was not declared in this scope
{ int a; cin>>a;
^
Main.cc:21:3: error: 'cout' was not declared in this scope
} cout<