(* BREADTH FIRST SEARCH *) PROGRAM CBREADTH(INPUT,OUTPUT); VAR K,I,J,N,RH,WH:INTEGER; Q:ARRAY[ 0..10 ] OF INTEGER; P:ARRAY[ 0..10,0..10 ] OF INTEGER; ALPHA:PACKED ARRAY[ 0..10 ] OF CHAR; SEARCH:PACKED ARRAY[ 0..10,0..10 ] OF CHAR; {$I D:BREADTH.SRC} BEGIN READLN(N); FOR I:=1 TO N DO READLN(ALPHA[I]); FOR I:=1 TO N DO BEGIN FOR J:=1 TO N DO READ( P[I,J]); READLN END ; BREADTH(N); FOR K:=1 TO N DO BEGIN FOR I:=1 TO N DO WRITE (SEARCH [I,K]); WRITELN END; END.