結果

問題 No.490 yukiソート
ユーザー motimoti
提出日時 2018-05-20 13:19:21
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 289 bytes
コンパイル時間 39 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 5,284 KB
最終ジャッジ日時 2023-09-10 23:59:43
合計ジャッジ時間 6,127 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 5 ms
5,032 KB
testcase_01 WA -
testcase_02 AC 5 ms
5,036 KB
testcase_03 AC 5 ms
4,764 KB
testcase_04 AC 15 ms
4,868 KB
testcase_05 AC 14 ms
4,764 KB
testcase_06 AC 14 ms
5,032 KB
testcase_07 AC 14 ms
5,020 KB
testcase_08 AC 14 ms
5,060 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 5 ms
4,980 KB
testcase_25 AC 5 ms
5,048 KB
testcase_26 AC 5 ms
4,952 KB
testcase_27 AC 5 ms
4,984 KB
testcase_28 AC 5 ms
5,076 KB
testcase_29 AC 5 ms
4,948 KB
testcase_30 AC 5 ms
4,892 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

#!/usr/bin/env perl

use strict;
use warnings;

my $n = <>; chomp$n;
my @vs = split/ /, <>; chomp$vs[$n-1];
for (my $i=0; $i<$n; $i++) {
  for (my $j=$i+1; $j<$n; $j++) {
    if ($vs[$i] > $vs[$j]) {
      ($vs[$i], $vs[$j]) = ($vs[$j], $vs[$i]);
    }
  }
}

print join(' ', @vs) . "\n";
0