var
i, j, minlen, ind, count, countrow: ineteger;
A:array[10, 10] of integer;
begin
for i:=1 to 10 do
for j:=1 to 10 do
readln(A[i,j]);
ind:=1;
minlen:=11;
count:=1;
countrow:=1;
for j:=2 to 10 do
if (A[i,j]=A[i,j-1]) then
inc(count)
else
if (count>countrow) then
countrow:=count;
end;
if (countrow<minlen) then
minlen:=countrow;
ind:=i;
writeln(A[ind,j])
end.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
program lab_10_41;
type phone=record
nomer:integer;
day:integer;
mesyac:integer;
god:integer;
chas:integer;
minuta:integer;
kod:integer;
othernomer:integer;
time:integer;
categoriya:integer;
tarif:real;
end;
var a:array [1..20] of phone;
m,max,k,i,n:integer;
b:string;
begin
writeln('Введите количество разговоров:');
readln(n);
for i:= 1 to n do
begin
a[i].nomer:=111111+random(888888);
a[i].day:=1+random(30);
a[i].mesyac:=1+random(11);
a[i].god:=2000+random(12);
var
i, j, minlen, ind, count, countrow: ineteger;
A:array[10, 10] of integer;
begin
for i:=1 to 10 do
for j:=1 to 10 do
readln(A[i,j]);
ind:=1;
minlen:=11;
for i:=1 to 10 do
begin
count:=1;
countrow:=1;
for j:=2 to 10 do
begin
if (A[i,j]=A[i,j-1]) then
inc(count)
else
begin
if (count>countrow) then
countrow:=count;
count:=1;
end;
end;
if (countrow<minlen) then
begin
minlen:=countrow;
ind:=i;
end;
end;
for j:=1 to 10 do
writeln(A[ind,j])
end.