結果
問題 | No.5017 Tool-assisted Shooting |
ユーザー | netyo715 |
提出日時 | 2023-07-16 15:10:56 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 1,679 bytes |
コンパイル時間 | 750 ms |
コンパイル使用メモリ | 87,172 KB |
実行使用メモリ | 101,144 KB |
スコア | 42,899 |
平均クエリ数 | 159.83 |
最終ジャッジ日時 | 2023-07-16 15:11:21 |
合計ジャッジ時間 | 22,590 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 156 ms
93,656 KB |
testcase_01 | AC | 158 ms
93,192 KB |
testcase_02 | AC | 168 ms
93,992 KB |
testcase_03 | AC | 157 ms
93,744 KB |
testcase_04 | AC | 187 ms
94,356 KB |
testcase_05 | AC | 157 ms
93,908 KB |
testcase_06 | AC | 229 ms
94,408 KB |
testcase_07 | AC | 151 ms
93,832 KB |
testcase_08 | AC | 160 ms
93,896 KB |
testcase_09 | AC | 162 ms
93,884 KB |
testcase_10 | AC | 193 ms
94,868 KB |
testcase_11 | AC | 158 ms
93,616 KB |
testcase_12 | AC | 244 ms
95,480 KB |
testcase_13 | AC | 194 ms
94,272 KB |
testcase_14 | AC | 160 ms
93,868 KB |
testcase_15 | AC | 154 ms
93,520 KB |
testcase_16 | AC | 147 ms
93,840 KB |
testcase_17 | AC | 169 ms
94,024 KB |
testcase_18 | AC | 175 ms
94,560 KB |
testcase_19 | AC | 180 ms
93,324 KB |
testcase_20 | AC | 149 ms
94,116 KB |
testcase_21 | AC | 156 ms
93,940 KB |
testcase_22 | AC | 163 ms
94,048 KB |
testcase_23 | AC | 194 ms
94,228 KB |
testcase_24 | AC | 187 ms
94,700 KB |
testcase_25 | AC | 171 ms
93,752 KB |
testcase_26 | AC | 156 ms
94,000 KB |
testcase_27 | AC | 165 ms
94,044 KB |
testcase_28 | AC | 142 ms
93,776 KB |
testcase_29 | AC | 143 ms
93,476 KB |
testcase_30 | AC | 156 ms
94,060 KB |
testcase_31 | AC | 149 ms
93,776 KB |
testcase_32 | AC | 156 ms
93,788 KB |
testcase_33 | AC | 151 ms
93,808 KB |
testcase_34 | AC | 151 ms
93,320 KB |
testcase_35 | AC | 171 ms
94,324 KB |
testcase_36 | AC | 158 ms
93,748 KB |
testcase_37 | AC | 155 ms
93,600 KB |
testcase_38 | AC | 162 ms
94,080 KB |
testcase_39 | AC | 190 ms
94,548 KB |
testcase_40 | RE | - |
testcase_41 | AC | 156 ms
94,216 KB |
testcase_42 | AC | 154 ms
93,120 KB |
testcase_43 | AC | 155 ms
93,320 KB |
testcase_44 | AC | 147 ms
93,492 KB |
testcase_45 | AC | 157 ms
94,132 KB |
testcase_46 | AC | 160 ms
94,256 KB |
testcase_47 | AC | 152 ms
93,868 KB |
testcase_48 | AC | 166 ms
94,228 KB |
testcase_49 | AC | 157 ms
94,240 KB |
testcase_50 | AC | 190 ms
93,984 KB |
testcase_51 | AC | 162 ms
94,104 KB |
testcase_52 | AC | 186 ms
94,396 KB |
testcase_53 | AC | 197 ms
94,676 KB |
testcase_54 | AC | 176 ms
94,440 KB |
testcase_55 | AC | 168 ms
93,640 KB |
testcase_56 | AC | 167 ms
93,732 KB |
testcase_57 | AC | 161 ms
94,252 KB |
testcase_58 | AC | 159 ms
94,324 KB |
testcase_59 | AC | 196 ms
94,244 KB |
testcase_60 | AC | 145 ms
93,740 KB |
testcase_61 | AC | 188 ms
93,916 KB |
testcase_62 | AC | 215 ms
94,688 KB |
testcase_63 | AC | 152 ms
93,680 KB |
testcase_64 | AC | 201 ms
94,640 KB |
testcase_65 | AC | 163 ms
93,852 KB |
testcase_66 | AC | 144 ms
93,824 KB |
testcase_67 | AC | 161 ms
93,748 KB |
testcase_68 | AC | 148 ms
93,996 KB |
testcase_69 | AC | 159 ms
93,912 KB |
testcase_70 | AC | 163 ms
93,532 KB |
testcase_71 | AC | 147 ms
93,800 KB |
testcase_72 | AC | 215 ms
94,468 KB |
testcase_73 | AC | 177 ms
93,820 KB |
testcase_74 | AC | 157 ms
93,884 KB |
testcase_75 | AC | 145 ms
93,548 KB |
testcase_76 | AC | 148 ms
93,688 KB |
testcase_77 | AC | 198 ms
94,368 KB |
testcase_78 | AC | 140 ms
93,636 KB |
testcase_79 | AC | 320 ms
95,680 KB |
testcase_80 | AC | 174 ms
93,336 KB |
testcase_81 | AC | 144 ms
94,172 KB |
testcase_82 | AC | 141 ms
93,452 KB |
testcase_83 | AC | 197 ms
94,768 KB |
testcase_84 | AC | 174 ms
93,732 KB |
testcase_85 | AC | 181 ms
94,084 KB |
testcase_86 | AC | 188 ms
94,684 KB |
testcase_87 | AC | 155 ms
93,460 KB |
testcase_88 | AC | 139 ms
93,716 KB |
testcase_89 | AC | 162 ms
94,016 KB |
testcase_90 | AC | 157 ms
93,284 KB |
testcase_91 | AC | 156 ms
94,096 KB |
testcase_92 | AC | 172 ms
94,152 KB |
testcase_93 | AC | 156 ms
93,728 KB |
testcase_94 | AC | 209 ms
94,916 KB |
testcase_95 | AC | 156 ms
93,604 KB |
testcase_96 | AC | 170 ms
93,908 KB |
testcase_97 | AC | 204 ms
94,508 KB |
testcase_98 | AC | 145 ms
94,160 KB |
testcase_99 | AC | 162 ms
94,260 KB |
ソースコード
from collections import deque H = 60 W = 25 board = deque([[[-1, -1] for _ in range(W)] for _ in range(H)]) level = 1 power = 0 jiki_w = 12 def min_dist(w1, w2): if w1 == w2: return 0, 0 if w1 < w2: if w2-w1 <= 12: return w2-w1, 1 else: return 25-(w2-w1), 2 if w1 > w2: if w1-w2 <= 12: return w1-w2, 2 else: return 25-(w1-w2), 1 return -1, -1 for turn in range(1000): board.popleft() board.append([[-1, -1] for _ in range(W)]) N = int(input()) if N==-1: exit() for _ in range(N): h, p, x = map(int, input().split()) board[59][x] = [h, p] next_w_dif = 30 next_w = jiki_w for w in range(W): for h in range(H): hp, pow = board[h][w] if hp == -1: continue dist, d = min_dist(jiki_w, w) a_turn = h-dist+1 if a_turn <= 0: continue if a_turn*level < hp: continue if dist < next_w_dif: next_w_dif = dist next_w = w dist, d = min_dist(jiki_w, next_w) if d==1 and board[0][(jiki_w+1)%W][0] == -1: print("R") jiki_w += 1 elif d==2 and board[0][(jiki_w-1)%W][0] == -1: print("L") jiki_w -= 1 else: print("S") for h in range(H): if board[h][jiki_w][0] == -1: continue board[h][jiki_w][0] -= level if board[h][jiki_w][0] < 0: power += board[h][jiki_w][1] level = 1+power//100 board[h][jiki_w] = [-1, -1] break