結果

問題 No.904 サメトロ
ユーザー ducktail
提出日時 2019-10-11 22:12:15
言語 Scheme
(Gauche-0.9.15)
結果
WA  
実行時間 -
コード長 394 bytes
コンパイル時間 66 ms
コンパイル使用メモリ 6,820 KB
実行使用メモリ 16,128 KB
最終ジャッジ日時 2024-11-25 07:42:18
合計ジャッジ時間 1,993 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (read-list n)
  (cond [(zero? n) '()]
        [else (let* ([a (read)]
                     [b (read)])
                (cons (list a b) (read-list (- n 1))))]))

(define (solve lx)
  (let ([sa (apply + (map car lx))]
        [sb (apply + (map cadr lx))])
    (+ 1 (min sa sb))))

(define (main args)
  (let* ([n (read)]
         [lab (read-list (- n 1))])
    (print (solve lab)))
  0)
0