Решите, пожалуйста задачу в Кумире, на ВЕТВЛЕНИЯ.
Срочно нужно!
Даю 95 баллов.

Ответы

VarN:integer=600;LABIRINT:array[0..600,0..600] of integer;...procedure setBlankAsDeadblockRec(x,y:integer);var k:integer;begink:=0;if LABIRINT[x,y]=blank thenbeginif LABIRINT[x-1,y]<>BLANK then k:=k+1;if LABIRINT[x,y-1]<>BLANK then k:=k+1;if LABIRINT[x+1,y]<>BLANK then k:=k+1;if LABIRINT[x,y+1]<>BLANK then k:=k+1;if k=4 then LABIRINT[x,y]:=DEADBLOCK;if k=3 thenbeginLABIRINT[x,y]:=DEADBLOCK;if LABIRINT[x-1,y]=BLANK then setBlankAsDeadblockRec(x-1,y);if LABIRINT[x,y-1]=BLANK then setBlankAsDeadblockRec(x,y-1);if LABIRINT[x+1,y]=BLANK then setBlankAsDeadblockRec(x+1,y);if LABIRINT[x,y+1]=BLANK then setBlankAsDeadblockRec(x,y+1);end;end;end;procedure setDeadblock;var i,j:integer;beginfor i:=1 to N-1 dofor j:=1 to N-1 dosetBlankAsDeadblockRec(i,j);end;





Нач
нц
пока справа свободно вправо
кц
нц
пока снизу свободно вниз
кц
нц
пока слева не свободно вверх
кц
нц
пока слева свободно влево
кц
кон









