纪中集训2020.01.16【NOIP普及组】模拟赛C组——————【1.product】解析
经典的题目有BUG的题目:
题目大意:
输入:
输出:
样例输入
5
2 4 2 3 3
1 0 0 1 0
样例输出
59
附上本来AC Pascal代码:
var
i,j,k,l,n,m:longint;
a,b:array[-105..1000005]of longint;
bz:array[-105..1000,-105..1000]of boolean;
sum:int64;
begin
assign(input,'product.in');
reset(input);
assign(output,'product.out');
rewrite(output);
readln(n);
fillchar(bz,sizeof(bz),true);
for i:=1 to n do
begin
read(a[i]);
end;
sum:=<