結果
| 問題 |
No.216 FAC
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-05 11:36:56 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 454 bytes |
| コンパイル時間 | 468 ms |
| コンパイル使用メモリ | 12,288 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-10-11 20:31:50 |
| 合計ジャッジ時間 | 1,692 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 WA * 1 |
ソースコード
N = int(input())
point = input().split()
point = [int(i) for i in point]
ans = input().split()
ans = [int(i) for i in ans]
score = [[0 for i in range(2)] for j in range(101)]
for j in range(0, 101):
score[j][0] = j
for i in range(0, N):
score[ans[i]][1] = score[ans[i]][1] + point[i]
K = score[0][1]
flag = 0
for i in range(1, 100):
if K < score[i][1]:
flag = 1
break
if(flag == 0):
print("YES")
else:
print("NO")