結果

問題 No.216 FAC
ユーザー tookunn_1213tookunn_1213
提出日時 2015-08-14 15:03:14
言語 Python2
(2.7.18)
結果
AC  
実行時間 11 ms / 1,000 ms
コード長 302 bytes
コンパイル時間 51 ms
コンパイル使用メモリ 6,784 KB
実行使用メモリ 6,144 KB
最終ジャッジ日時 2024-10-15 00:40:41
合計ジャッジ時間 1,086 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(raw_input())
score = map(int,raw_input().split())
solve = map(int,raw_input().split())
solver = [0 for i in range(100+ 1)]
for i in range(N):
	solver[solve[i]] += score[i]
solver[0] = sum([score[i] for i in range(N) if solve[i] == 0])
if solver[0] == max(solver):
	print "YES"
else:
	print "NO"
0