摘要:
有N个顶点,每个顶点有一个权值,初始值皆为0。接下来有M次操作,操作内容为 [a,b) or [b,a),将区间内顶点i 权值置为1,求最后顶点权值为0的数量。1#include<stdio.h>2#include<string.h>3intmain()4{5intn,m,a,b,i;6intf[50010];7while(~scanf("%d%d",&n,&m))8{9memset(f,0,sizeof(f));10for(i=1;i<=m;i++)11{12scanf("%d%d",&a,&
阅读全文