結果

問題 No.216 FAC
ユーザー compass19
提出日時 2016-06-03 22:30:10
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 236 bytes
コンパイル時間 111 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-10-08 06:48:45
合計ジャッジ時間 1,749 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 15 WA * 3 RE * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = [0 for i in range(n)]
for i in range(n):
    c[n-1-b[i]] = c[n-1-b[i]] + a[i]
if c.index(max(c)) == n-1:
    print('YES')
else:
    print('NO')
0