1 条题解

  • 1
    @ 2026-2-25 11:42:40

    建议降橙

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int n,p1,p2;scanf("%d%d%d",&n,&p1,&p2);
    	if(p1==1&&p2==2)puts("0");
    	else printf("%d\n",min(n-p1+1,p1+1));
    	return 0;
    }
    
    • 1

    信息

    ID
    2504
    时间
    2000ms
    内存
    1024MiB
    难度
    10
    标签
    递交数
    3
    已通过
    2
    上传者