| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 120287 | 张裕铭 | 最大值与最小值的差 | C++ | Runtime Error | 0 MS | 268 KB | 286 | 2025-05-25 09:38:14 |
#include<bits/stdc++.h> using namespace std; int main() { int a[11],m=0,y=100,x; cin>>x; for(int i=1;i<=x;i++) cin>>a[i]; for(int i=1;i<=x;i++){ if(a[i]>m){ m=a[i]; } } for(int i=1;i<=x;i++){ if(a[i]<y){ y=a[i]; } } cout<<m-y; return 0; }
*** stack smashing detected ***: ./Main terminated