結果
| 問題 |
No.607 開通777年記念
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-09-21 18:46:44 |
| 言語 | Scheme (Gauche-0.9.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 782 bytes |
| コンパイル時間 | 49 ms |
| コンパイル使用メモリ | 6,688 KB |
| 実行使用メモリ | 39,640 KB |
| 最終ジャッジ日時 | 2024-09-21 18:46:52 |
| 合計ジャッジ時間 | 6,721 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 8 TLE * 1 -- * 1 |
ソースコード
(use srfi.217)
(define yuki607
(let*
(
(n-m (map string->number (string-split (read-line) " ")))
(n (car n-m))
(m (cadr n-m))
(r (make-vector n 0))
(ok 0)
)
(define (process-line line)
(let*
(
(a (map string->number (string-split line " ")))
(d (iset 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 (iset-member d (- c 777) #f) (set! ok 1))
(set! d (iset-adjoin! d c)))
(iota n)
)))
(for-each
(lambda (_) (process-line (read-line)))
(iota m))
(if (= ok 1)
(display "YES")
(display "NO"))))