Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
121092 | XIAOXINGYUN | 幽灵粒子 | C++ | 解答错误 | 0 | 1 MS | 252 KB | 283 | 2024-01-21 15:15:13 |
#include<bits/stdc++.h> using namespace std; int main() { int n,L,Max=0,Min=0; scanf("%d%d",&n,&L); for(int i=1,temp;i<=n;i++) { scanf("%d",&temp); Max=max(Max,max(L-temp+1,temp)); Min=min(Min,min(L-temp+1,temp)); } printf("%d%d",Min,Max); return 0; }