結果
問題 |
No.571 3人兄弟(その2)
|
ユーザー |
![]() |
提出日時 | 2024-11-06 18:46:07 |
言語 | Common Lisp (sbcl 2.5.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 740 bytes |
コンパイル時間 | 329 ms |
コンパイル使用メモリ | 37,252 KB |
実行使用メモリ | 32,404 KB |
最終ジャッジ日時 | 2024-11-06 18:46:11 |
合計ジャッジ時間 | 1,119 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 4 WA * 8 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 06 NOV 2024 06:46:10 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.007
ソースコード
(defun custom-sort (lst) (sort lst (lambda (a b) (let ((first-a (first a)) (first-b (first b)) (second-a (second a)) (second-b (second b))) (or (> first-a first-b) (and (= first-a first-b) (> second-a second-b))))))) (defun main (&rest argv) (declare (ignorable argv)) (let* ((ha (read)) (wa (read)) (hb (read)) (wb (read)) (hc (read)) (wc (read)) (h1 (list ha wa 'A)) (h2 (list hb wb 'B)) (h3 (list hc wc 'C)) (h (custom-sort (list h1 h2 h3)))) (dotimes (i 3) (format t "~a~%" (nth 2 (nth i h)))))) (main)