1 条题解

  • 2
    @ 2024-8-8 19:15:15
    #include<iostream>
    using namespace std;
    int l , m,x,y,a[10005],ans=0;
    int main()
    {
    	scanf("%d%d", &l,&m);
    	while(m--)
    	{
    		scanf("%d%d",&x,&y);
    		for(int i=x;i<=y; i++) {
    			a[i]=1;
    		}
    	}
    	for(int i =0; i<=l;i++){
    		if(!a[i]) ans++;
    	}
    	printf("%d", ans);
    }
    是给残疾人抄的
    • 1

    信息

    ID
    354
    时间
    1000ms
    内存
    256MiB
    难度
    4
    标签
    (无)
    递交数
    114
    已通过
    53
    上传者