結果
問題 | No.3067 +10 Seconds Clock |
ユーザー |
![]() |
提出日時 | 2025-03-21 22:26:50 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 177 ms / 2,000 ms |
コード長 | 486 bytes |
コンパイル時間 | 309 ms |
コンパイル使用メモリ | 82,652 KB |
実行使用メモリ | 124,140 KB |
最終ジャッジ日時 | 2025-03-21 22:26:56 |
合計ジャッジ時間 | 3,602 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
n,now=map(int,input().split()) t=list(map(int,input().split())) k=int(input()) x=set(map(int,input().split())) cnt=len(x) through=0 nxt=now for i in range(n-1): now-=t[i] nxt-=t[i] if now<1: if through*10+now<1: exit(print(-1)) else: tmp=now+through*10 through,now=divmod(tmp,10) if now==0: now+=10 through-=1 if i+2 in x:through+=1 #print(now,through) print(cnt-through)