1 条题解

  • 0
    @ 2025-4-14 18:45:31

    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

    信息

    ID
    3504
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者