welleyth

9561. Найбольшее в каждом столбце

Dec 2nd, 2020
513
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var i,j,n,m,mx:int64;
  2.     A : array[0..1000,0..1000] of int64;
  3. begin
  4.  
  5.     readln(n,m);
  6.  
  7.     for i:=1 to n do
  8.     begin
  9.         for j:=1 to m do
  10.         begin
  11.                 read(A[i,j]);
  12.         end;
  13.         readln()
  14.     end;
  15.  
  16.     for j:=1 to m do
  17.     begin
  18.         mx := -100000;
  19.         for i:=1 to n do
  20.             if(mx < A[i,j]) then
  21.                 mx := A[i,j];
  22.         write(mx,' ');
  23.     end;
  24. end.
RAW Paste Data