結果
| 問題 |
No.2999 Long Long Friedrice
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-12-24 00:02:08 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 122 ms / 2,000 ms |
| コード長 | 283 bytes |
| コンパイル時間 | 1,225 ms |
| コンパイル使用メモリ | 82,036 KB |
| 実行使用メモリ | 112,896 KB |
| 最終ジャッジ日時 | 2024-12-24 00:02:15 |
| 合計ジャッジ時間 | 6,393 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 6 |
| other | AC * 33 |
ソースコード
N=int(input()) A=list(map(int,input().split())) B=list(map(int,input().split())) dp=[0]*1000005 dp[1]=1 use=[[] for i in range(1000005)] for i in range(N): use[A[i]].append(B[i]) ans=0 for i in range(1000005): if dp[i]==0: continue ans=i for j in use[i]: dp[i+j]=1 print(ans)