結果
問題 |
No.216 FAC
|
ユーザー |
|
提出日時 | 2016-09-24 12:52:05 |
言語 | Python2 (2.7.18) |
結果 |
RE
|
実行時間 | - |
コード長 | 266 bytes |
コンパイル時間 | 63 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-17 20:33:48 |
合計ジャッジ時間 | 1,087 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 WA * 1 RE * 11 |
ソースコード
N = int(raw_input()) K = 0 score = map(int, raw_input().split()) kai = map(int, raw_input().split()) arr = [ 0 for i in range(100)] for i in range(N): if kai[i] == 0: K += score[i] else: arr[kai[i]] = score[i] if K >= max(arr): print "YES" else: print "NO"