Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
121096 mairuisheng 幽灵粒子 C++ 通过 100 0 MS 248 KB 283 2024-01-21 15:15:28

Tests(10/10):


#include<bits/stdc++.h> using namespace std; int main() { int n,l,maxn=0,minn=0; scanf("%d%d",&n,&l); for(int i=1,temp;i<=n;i++) { scanf("%d",&temp); maxn=max(maxn,max(l-temp+1,temp)); minn=max(minn,min(l-temp+1,temp)); } cout<<minn<<" "<<maxn; return 0; }


测评信息: