| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 121010 | 刘嘉乐 | 幽灵粒子 | C++ | Accepted | 100 | 1 MS | 260 KB | 281 | 2024-01-21 14:48:01 |
#include<iostream> using namespace std; int a[5005]; int main(){ int n,l; cin>>n>>l; l++; int shs = 0,los = 0; for(int i=1;i<=n;i++){ int yt; cin>>yt; shs = max(shs,min(yt,l-yt)); los = max(los,max(yt,l-yt)); } cout<<shs<<" "<<los<<endl; return 0; }