結果
| 問題 |
No.3067 +10 Seconds Clock
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2025-03-21 21:33:30 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 247 ms / 2,000 ms |
| コード長 | 375 bytes |
| コンパイル時間 | 414 ms |
| コンパイル使用メモリ | 12,160 KB |
| 実行使用メモリ | 42,496 KB |
| 最終ジャッジ日時 | 2025-03-21 21:33:35 |
| 合計ジャッジ時間 | 4,097 ms |
|
ジャッジサーバーID (参考情報) |
judge7 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
import sys
input = sys.stdin.readline
N,T=map(int,input().split())
TL=list(map(int,input().split()))
K=int(input())
X=set(map(int,input().split()))
canuse=0
ANS=0
for i in range(N-1):
T-=TL[i]
while T<=0 and canuse>0:
T+=10
canuse-=1
ANS+=1
if T<=0:
print(-1)
exit()
if i+2 in X:
canuse+=1
print(ANS)
titia