program zhuri; uses crt; const im=10; type trec=record count:byte;ima:string[9]end; var mas:array[0..im]of trec; sta:array[1..6]of string[9]; zh,n,y:byte; i,z,max:integer; begin clrscr; write('skolko zhuri? - ');readln(zh); for y:=1 to zh do begin textcolor(10); writeln('zhuri ',y:2); textcolor(7); for n:=2 to 6 do repeat readln(sta[n]); for i:=2 to n-1 do if sta[n]=sta[i] then sta[n]:=''; if sta[n]=''then begin gotoxy(1,wherey-1); write(' '); gotoxy(1,wherey); end; until sta[n]<>''; {-----------------------------------------------} for i:=2 to 6 do for z:=0 to im do if mas[z].ima<>'' then begin if mas[z].ima=sta[i] then begin mas[z].count:=mas[z].count+1; break; end; end else begin mas[z].ima:=sta[i]; mas[z].count:=mas[z].count+1; break; end; end; writeln; {--------------------------------} max:=mas[0].count; for z:=0 to im do if mas[z].count>max then max:=mas[z].count; {--------------------------------} for z:=0 to im do begin if mas[z].count=max then textcolor(12) else textcolor(7); write(z:2);write(' '); write(mas[z].ima); writeln(mas[z].count:2); end; readln; end.