Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
121025 罗嘉为 幽灵粒子 C++ 通过 100 1 MS 252 KB 285 2024-01-21 14:52:45

Tests(10/10):


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


测评信息: