1 solutions

  • 0
    @ 2024-12-10 22:03:04

    Pascal :

    var a:array[1..32767] of integer;
        i,n,t,j:integer;
    begin
     i:=0;
     while not eoln do
      begin
       i:=i+1;
       read(a[i]);
      end;
      readln;
      while not eoln do
      begin
       i:=i+1;
       read(a[i]);
      end;
      n:=i;
     for j:=1 to n-1 do
      for i:= 1 to n-j do
       if a[i]<a[i+1] then
        begin
         t:=a[i];
         a[i]:=a[i+1];
         a[i+1]:=t;
        end;
     for i:=n downto 2 do
      write(a[i],' ');
     writeln(a[1]);
    end.
    
    • 1

    Information

    ID
    512
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By