結果
問題 |
No.216 FAC
|
ユーザー |
![]() |
提出日時 | 2017-08-25 20:02:43 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 285 bytes |
コンパイル時間 | 48 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 6,400 KB |
最終ジャッジ日時 | 2024-10-15 15:42:52 |
合計ジャッジ時間 | 989 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 WA * 6 |
ソースコード
n = input() a = map(int, raw_input().split()) b = map(int, raw_input().split()) score = 0 c = [] for i in range(len(a)): if b[i] == 0: score += a[i] else: c.append(a[i]) if len(c) == 0: print "YES" elif score >= min(c): print "YES" else: print "NO"