結果

問題 No.431 死亡フラグ
コンテスト
ユーザー ducktail
提出日時 2019-10-01 12:20:40
言語 Scheme
(Gauche-0.9.15)
コンパイル:
true
実行:
gosh _filename_
結果
AC  
実行時間 19 ms / 2,000 ms
コード長 398 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 71 ms
コンパイル使用メモリ 8,100 KB
実行使用メモリ 17,152 KB
最終ジャッジ日時 2026-04-19 07:18:08
合計ジャッジ時間 1,583 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

(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