| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 75618 | sh25_shenpy | 相邻身高差 | C++ | 通过 | 0 MS | 244 KB | 285 | 2025-12-08 17:14:34 |
#include<bits/stdc++.h> using namespace std; int s[101]; int main(){ int n,max=-1,k; cin>>n; for(int i=0;i<n;++i){ cin>>s[i];} for(int j=0;j<n-1;++j){ k=s[j+1]-s[j]; if(k<0) k=-k; if(k>max) max=k;} cout<<max; return 0;}