結果
| 問題 |
No.216 FAC
|
| コンテスト | |
| ユーザー |
Rin
|
| 提出日時 | 2015-09-08 17:53:12 |
| 言語 | Scheme (Gauche-0.9.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 873 bytes |
| コンパイル時間 | 128 ms |
| コンパイル使用メモリ | 6,688 KB |
| 実行使用メモリ | 16,384 KB |
| 最終ジャッジ日時 | 2024-07-19 04:58:55 |
| 合計ジャッジ時間 | 1,482 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 24 |
ソースコード
(define (System.out.println x)
(begin
(display x)
(newline)
)
)
(define a (make-vector 101))
(define b (make-vector 101))
(let loop(
(i 0)
(N (read))
)
(if (< i N)
(begin
(vector-set! a i (read))
(loop (+ i 1) N)
)
(let loop2(
(j 0)
(Max 0)
(foo (read))
)
(if (< j N)
(begin
(vector-set! b foo (+ (vector-ref a j) (vector-ref b foo)))
(if (> (vector-ref b foo) Max)
(loop2 (+ j 1) foo (read))
(loop2 (+ j 1) Max (read))
)
)
(if (or (= Max 0) (= (vector-ref b 0) (vector-ref b Max)))
(System.out.println "YES")
(System.out.println "NO")
)
)
)
)
)
Rin