Vu Hoai Bang
Tổng số bài gửi : 15 Join date : 13/12/2022
| Tiêu đề: bai 8: vu hoai bang Mon Dec 26, 2022 9:07 pm | |
| - Code:
-
var a:array[1..1000,1..1000] of longint; c:array[1..1000] of longint; n,m,i,j,d,rmin:longint; begin assign(input,'bai3onl.inp');reset(input); assign(output,'bai3onl.out');rewrite(output); read(n,m); for i:=1 to n do for j:=1 to m do read(a[i,j]); for j:=1 to m do begin rmin:=a[1,j]; for i:=1 to n do if rmin>=a[i,j] then rmin:=a[i,j]; c[j]:=rmin; end; for j:=1 to m do writeln(c[j]); close(input);close(output); end.
| |
|