結果
問題 | No.5017 Tool-assisted Shooting |
ユーザー |
|
提出日時 | 2023-07-16 15:29:36 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 237 ms / 2,000 ms |
コード長 | 988 bytes |
コンパイル時間 | 373 ms |
コンパイル使用メモリ | 87,268 KB |
実行使用メモリ | 95,364 KB |
スコア | 141,620 |
平均クエリ数 | 626.27 |
最終ジャッジ日時 | 2023-07-16 15:29:59 |
合計ジャッジ時間 | 22,594 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
純コード判定しない問題か言語 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 100 |
ソースコード
import sys from collections import deque # P=list(map(int,input().split())) turn=1 power=1 pow_num=0 l=[] l_now=0 #↑あとで消す now=12 to_go=1 while turn<=1000: N=int(input()) if(N==-1): sys.exit() else: ans="S" for i in range(N): h,p,x=map(int,input().split()) if(x==now): l.append([h,p,turn+59]) if(to_go==1): if(len(l)-1>=l_now): l[l_now][0]-=power if(l[l_now][0]<=0): pow_num+=l[l_now][1] l_now+=1 power=1+pow_num//100 if(len(l)-1>=l_now): if(l[l_now][2]==turn+1): to_go=2 if(to_go==2): print("L") to_go=3 elif(to_go==1): print("S") elif(to_go==3): print("S") to_go=0 else: print("R") l_now+=1 to_go=1 turn+=1