結果

問題 No.571 3人兄弟(その2)
ユーザー ducktailducktail
提出日時 2017-12-20 15:08:04
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 19 ms / 2,000 ms
コード長 565 bytes
コンパイル時間 59 ms
コンパイル使用メモリ 5,380 KB
実行使用メモリ 11,940 KB
最終ジャッジ日時 2023-08-22 10:51:45
合計ジャッジ時間 1,671 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
11,788 KB
testcase_01 AC 19 ms
11,792 KB
testcase_02 AC 17 ms
11,724 KB
testcase_03 AC 19 ms
11,940 KB
testcase_04 AC 18 ms
11,712 KB
testcase_05 AC 18 ms
11,696 KB
testcase_06 AC 18 ms
11,748 KB
testcase_07 AC 18 ms
11,892 KB
testcase_08 AC 17 ms
11,756 KB
testcase_09 AC 18 ms
11,892 KB
testcase_10 AC 17 ms
11,696 KB
testcase_11 AC 18 ms
11,792 KB
testcase_12 AC 17 ms
11,696 KB
testcase_13 AC 17 ms
11,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (main args)
  (let* ([ha (read)]
         [wa (read)]
         [hb (read)]
         [wb (read)]
         [hc (read)]
         [wc (read)]
         [sa (cons 'A (cons ha wa))]
         [sb (cons 'B (cons hb wb))]
         [sc (cons 'C (cons hc wc))]
         [sl (list sa sb sc)])
    (for-each print
              (map car (sort sl
                             (lambda (x y)
                               (if (= (cadr x) (cadr y))
                                   (< (cddr x) (cddr y))
                                   (> (cadr x) (cadr y))))))))
  0)
0