結果
問題 |
No.216 FAC
|
ユーザー |
|
提出日時 | 2024-04-30 00:47:50 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 390 bytes |
コンパイル時間 | 275 ms |
コンパイル使用メモリ | 82,452 KB |
実行使用メモリ | 52,876 KB |
最終ジャッジ日時 | 2024-11-19 10:47:53 |
合計ジャッジ時間 | 2,266 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 WA * 2 |
ソースコード
def main(): n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) scores = [0 for i in range(100)] score = 0 for i, j in enumerate(b): if j == 0: score += a[i] else: scores[i-1] += a[i] ans = "YES" if score >= max(scores) else "NO" print(ans) if __name__ == "__main__": main()