結果
| 問題 | No.216 FAC |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-30 00:50:36 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 23 ms / 1,000 ms |
| + 502µs | |
| コード長 | 417 bytes |
| 記録 | |
| コンパイル時間 | 2,022 ms |
| コンパイル使用メモリ | 81,784 KB |
| 実行使用メモリ | 56,280 KB |
| 最終ジャッジ日時 | 2026-09-26 15:24:59 |
| 合計ジャッジ時間 | 2,277 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
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 in range(n):
if b[i] == 0:
score += a[i]
else:
scores[b[i]-1] += a[i]
ans = "YES" if score >= max(scores) else "NO"
# print(score, scores)
print(ans)
if __name__ == "__main__":
main()