結果
| 問題 |
No.3067 +10 Seconds Clock
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-21 23:07:27 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 449 bytes |
| コンパイル時間 | 845 ms |
| コンパイル使用メモリ | 82,600 KB |
| 実行使用メモリ | 83,992 KB |
| 最終ジャッジ日時 | 2025-03-21 23:07:32 |
| 合計ジャッジ時間 | 4,265 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge7 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 1 WA * 1 TLE * 1 -- * 20 |
ソースコード
n,t=map(int,input().split()) L=list(map(int,input().split())) k=int(input()) A=list(map(int,input().split())) ans=10**6 for bit in range(2**k): tmp=[] cnt=0 for i in range(k): if bit>>i&1: cnt+=1 tmp.append(A[i]) tmp=tmp[::-1] T=t now=0 flag=1 for i in range(n-1): if tmp: if tmp[-1]==i: tmp.pop() T+=10 T-=L[i] if T<=0: flag=0 break if flag: ans=min(ans,cnt) print(ans if ans<10**6 else -1)