結果

問題 No.431 死亡フラグ
ユーザー ducktail
提出日時 2019-10-01 12:20:40
言語 Scheme
(Gauche-0.9.15)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 398 bytes
コンパイル時間 27 ms
コンパイル使用メモリ 6,692 KB
実行使用メモリ 16,896 KB
最終ジャッジ日時 2024-10-03 05:40:27
合計ジャッジ時間 1,131 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

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