結果

問題 No.431 死亡フラグ
ユーザー ducktailducktail
提出日時 2019-10-01 12:20:40
言語 Scheme
(Gauche-0.9.13)
結果
AC  
実行時間 19 ms / 2,000 ms
コード長 398 bytes
コンパイル時間 233 ms
コンパイル使用メモリ 7,128 KB
実行使用メモリ 12,476 KB
最終ジャッジ日時 2023-07-26 19:04:31
合計ジャッジ時間 1,989 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
12,344 KB
testcase_01 AC 18 ms
12,352 KB
testcase_02 AC 18 ms
12,384 KB
testcase_03 AC 19 ms
12,396 KB
testcase_04 AC 19 ms
12,476 KB
testcase_05 AC 19 ms
12,384 KB
testcase_06 AC 19 ms
12,428 KB
testcase_07 AC 19 ms
12,404 KB
testcase_08 AC 19 ms
12,376 KB
testcase_09 AC 19 ms
12,364 KB
testcase_10 AC 19 ms
12,384 KB
testcase_11 AC 18 ms
12,396 KB
testcase_12 AC 19 ms
12,380 KB
testcase_13 AC 19 ms
12,356 KB
testcase_14 AC 18 ms
12,432 KB
testcase_15 AC 17 ms
12,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(use util.match)

(define (read-list n)
  (cond [(zero? n) '()]
        [else (let1 x (read)
                    (cons x (read-list (- n 1))))]))

(define (solve l)
  (match l
         [(_ _ _ 1) 'SURVIVED]
         [(0 0 _ _) 'SURVIVED]
         [(0 _ 0 _) 'SURVIVED]
         [(_ 0 0 _) 'SURVIVED]
         [_ 'DEAD]))

(define (main args)
  (let1 l (read-list 4)
        (print (solve l)))
  0)
0