2 câu trả lời
var
a,b,d:array[1..10000]of longint;
i,n,t,j,max:longint;
begin
read(N);
for i:=1 to n do read(a[i],b[i]);
for i:=1 to 24 do
D[i]:=0;
for i:=1 to n do
begin
for j:=A[i] to b[i] do
d[j]:=d[j]+1;
end;
max:=d[1];
for i:=1 to n do
if d[i]>max then max:=d[i];
writeln(max,' ');
end.
uses crt;
var A : array [1 .. 100] of integer;
i, N : integer;
begin
clrscr;
write('Nhap so phan tu = '); readln(N);
write('Nhap day gom ', N, ' so : ');
for i := 1 to N do read(A[i]);
write('Day dao nguoc : ');
for i := N downto 1 do write(A[i], ' ');
readln
end.
Câu hỏi trong lớp
Xem thêm