开关灯暴力都写不出来了,,,,求解哪里错了
pascal吧
全部回复
仅看楼主
level 6
L1613456497 楼主
var x,y,q,w,e:array[1..100000]of longint;
i,j,a,b,c,m,n:longint;
begin
fillchar(x,sizeof(x),0);
read(n,m);
for i:=1 to m do
read(q[i],w[i],e[i]);
for i:=1 to m do
if q[i]=0 then
for j:=w[i] to e[i] do x[j]:=1;
if q[i]=1 then
for j:=w[i] to e[i] do
begin
if x[j]=1 then inc(a);
end;
writeln(a);
end.
2015年09月27日 05点09分 1
level 11
题目描述是什么
2015年09月27日 06点09分 2
level 9
题呢
2015年09月27日 06点09分 3
1