結果
問題 | No.216 FAC |
ユーザー |
|
提出日時 | 2017-08-05 11:38:55 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 31 ms / 1,000 ms |
コード長 | 454 bytes |
コンパイル時間 | 216 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-10-11 20:32:47 |
合計ジャッジ時間 | 1,842 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
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, 101): if K < score[i][1]: flag = 1 break if(flag == 0): print("YES") else: print("NO")