Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
121943 沈子雯 幽灵粒子 C++ 通过 100 1 MS 252 KB 251 2024-01-22 10:44:34

Tests(10/10):


#include<bits/stdc++.h> using namespace std; int l,n,temp,mn,mx; int main() { cin>>n>>l; for(int i=1;i<=n;i++) { cin>>temp; mn=max(mn,min(l-temp+1,temp)); mx=max(mx,max(l-temp+1,temp)); } cout<<mn<<" "<<mx<<endl; return 0; }


测评信息: