就不相信这么做能这么快

测试数据 #0: Accepted, time = 0 ms, mem = 620 KiB, score = 10
测试数据 #1: Accepted, time = 0 ms, mem = 620 KiB, score = 10
测试数据 #2: Accepted, time = 0 ms, mem = 620 KiB, score = 10
测试数据 #3: Accepted, time = 15 ms, mem = 624 KiB, score = 10
测试数据 #4: Accepted, time = 0 ms, mem = 624 KiB, score = 10
测试数据 #5: Accepted, time = 15 ms, mem = 624 KiB, score = 10
测试数据 #6: Accepted, time = 0 ms, mem = 620 KiB, score = 10
测试数据 #7: Accepted, time = 0 ms, mem = 620 KiB, score = 10
测试数据 #8: Accepted, time = 0 ms, mem = 620 KiB, score = 10
测试数据 #9: Accepted, time = 0 ms, mem = 620 KiB, score = 10
var
a:array[0..10000] of boolean;
n,m,i,j,ans,aa,b:longint;

begin
read(n,m);
ans:=n+1;
fillchar(a,sizeof(a),true);
for i:=1 to m do
begin
read(aa,b);
for j:=aa to b do
if a[j] then
begin
dec(ans);
a[j]:=false;
end;
end;
write(ans);
end.
by slzxchy

0 条评论

目前还没有评论...

信息

ID
1103
难度
4
分类
模拟 点击显示
标签
递交数
14316
已通过
6534
通过率
46%
被复制
55
上传者