T.Y.S 2015-08-03 05:21:11
点我顶贴
收藏
删除
var
n,m,i,j,x,y,t:longint;
a:array[0..10000] of longint;
begin
readln(n,m);
for i:=1 to m do
begin
readln(x,y);
for j:=x to y do a[j]:=1;
end;
t:=0;
for i:=0 to n do if a[i]=0 then inc(t);
writeln(t);
end.
#1 qzsy-JZY@2016-01-01 22:04:58
33550
回复
删除
for j:=x to y do a[j]:=1;
for i:=0 to n do if a[i]=0 then inc(t);
这两段什么意思啊?哪位大神讲解下?