2*2=4
????!!!?!!?!!?!!!?!??
C(16) = 1100(2)
Проверка:
C(16) = 12(10)
1100(2) = 2^3+2^2 = 8+4 = 12(10)
Винчестер *********************************************************************************************
4 Гб = 4096 Мб, 1 Тб = 1048576 Мб, 700 Кб = 0.683594 Мб
Program chik;
var a,b:array[1..10000]of integer;
n,i,j,k:integer;
begin
read(N);
for i:=1 to n do
read(a[i]);
j:=1;
b[j]:=1;
if(a[1]>=0)then k:=1 else k:=0;
for i:=2 to n do
begin
if((a[i]>=0)and(k=0))or((a[i]<0)and(k=1))then begin
k:=(k+1)mod 2;
j:=j+1;
b[j]:=i;
end;
end;
for i:=1 to j do
write(b[i],' ');
end.