#include <iostream> using namespace std; int main() { int N,L,maxx = 0,minn = 0; cin>>N>>L; int a[N],b[N][2]; for(int i = 0;i<3;i++){ cin>>a[i]; maxx = max(maxx,max(L+1-a[i],a[i])); minn = max(minn,min(L+1-a[i],a[i])); } cout<<minn<<" "<<maxx; return 0; }
标签:幽灵,maxx,粒子,minn,int,max From: https://www.cnblogs.com/wangyihang-xh/p/17501446.html