/MULTI - Dấu trong đoạn

<Problem>

http://ntucoder.net/Problem/Details/3388
              Uses Crt;
        Var n,m,i,a:longint; l,r,nega,zero:array[-10..100000] of longint;
        Begin
            readln(n,m);
            for i:=1 to n do
             begin
                 read(a);
                 if a=0 then zero[i]:=1;
                 zero[i]:=zero[i]+zero[i-1];
        
                 if a<0 then Nega[i]:=1;
                 nega[i]:=nega[i]+nega[i-1];
             end;
            for i:=1 to m do readln(l[i],r[i]);
            for i:=1 to m do
             begin
                 if zero[r[i]]-zero[l[i]-1]>0 then writeln(0)
                  else
                   if (nega[r[i]]-nega[l[i]-1]) mod 2=0 then writeln('+') else writeln('-');
             end;
             readln;
        End.