Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
121111 | A班卞定熙 | 幽灵粒子 | C++ | Wrong Answer | 0 | 1 MS | 244 KB | 319 | 2024-01-21 15:22:26 |
#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=max(Min,min(l-temp+1,temp)); } printf("%d%d",Min,Max); return 0; }