結果

問題 No.216 FAC
コンテスト
ユーザー bellangeldindon
提出日時 2019-05-09 13:21:00
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 80 ms / 1,000 ms
コード長 318 bytes
記録
コンパイル時間 136 ms
コンパイル使用メモリ 77,388 KB
最終ジャッジ日時 2025-12-04 01:40:38
ジャッジサーバーID
(参考情報)
judge1 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N = int(raw_input())
score = map(int, raw_input().split())
solver = map(int, raw_input().split())
totalscore = []
for i in range(0, 101):
	totalscore.append(0)
for i in range(0, N):
	totalscore[solver[i]] += score[i]
ans = 'YES'
for i in range(1, 101):
	if totalscore[0] < totalscore[i]:
		ans = 'NO'
		break
print ans
0