| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 155782 | 安俊积 | 最大值与最小值的差 | C++ | Accepted | 2 MS | 272 KB | 256 | 2026-06-13 14:36:45 |
#include<bits/stdc++.h> using namespace std; int main(){ int m; cin>>m; int j = -10001; int t = 10001; int n; for(int i = 1;i < m;i++){ cin>>n; if(n > j){ j = n; } if(n < t){ t = n; } } cout<<j - t; return 0; }