結果
問題 | No.607 開通777年記念 |
ユーザー |
|
提出日時 | 2024-09-21 18:09:07 |
言語 | Scheme (Gauche-0.9.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 779 bytes |
コンパイル時間 | 50 ms |
コンパイル使用メモリ | 5,376 KB |
実行使用メモリ | 26,112 KB |
最終ジャッジ日時 | 2024-09-21 18:09:13 |
合計ジャッジ時間 | 5,316 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 8 TLE * 1 -- * 1 |
ソースコード
(define yuki607(let*((input (read-line))(n-m (map string->number (string-split input " ")))(n (car n-m))(m (cadr n-m))(r (make-vector n 0))(flag 0))(define (process-line line)(let*((a (map string->number (string-split line " ")))(d (list 0))(c 0))(for-each(lambda (i)(vector-set! r i (+ (vector-ref r i) (list-ref a i)))(set! c (+ c (vector-ref r i)))(when (member (- c 777) d) (set! flag 1))(set! d (cons c d)))(iota n))))(for-each(lambda (_) (process-line (read-line)))(iota m))(if (= flag 1)(display "YES\n")(display "NO\n"))))