結果
| 問題 | 
                            No.216 FAC
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Rin
                         | 
                    
| 提出日時 | 2015-09-08 17:54:36 | 
| 言語 | Scheme  (Gauche-0.9.15)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 889 bytes | 
| コンパイル時間 | 194 ms | 
| コンパイル使用メモリ | 5,376 KB | 
| 実行使用メモリ | 16,384 KB | 
| 最終ジャッジ日時 | 2024-07-19 04:59:25 | 
| 合計ジャッジ時間 | 1,661 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / 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 (not (eof-object? foo))
            (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