結果
問題 | No.5017 Tool-assisted Shooting |
ユーザー | とろちゃ |
提出日時 | 2023-07-16 15:09:52 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 2,368 bytes |
コンパイル時間 | 368 ms |
コンパイル使用メモリ | 87,240 KB |
実行使用メモリ | 99,780 KB |
スコア | 177,163 |
平均クエリ数 | 819.63 |
最終ジャッジ日時 | 2023-07-16 15:10:22 |
合計ジャッジ時間 | 29,308 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | RE | - |
testcase_01 | RE | - |
testcase_02 | RE | - |
testcase_03 | RE | - |
testcase_04 | RE | - |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | AC | 138 ms
92,384 KB |
testcase_08 | RE | - |
testcase_09 | AC | 129 ms
91,976 KB |
testcase_10 | RE | - |
testcase_11 | RE | - |
testcase_12 | RE | - |
testcase_13 | RE | - |
testcase_14 | RE | - |
testcase_15 | RE | - |
testcase_16 | RE | - |
testcase_17 | RE | - |
testcase_18 | RE | - |
testcase_19 | RE | - |
testcase_20 | RE | - |
testcase_21 | RE | - |
testcase_22 | AC | 140 ms
92,080 KB |
testcase_23 | RE | - |
testcase_24 | AC | 140 ms
92,384 KB |
testcase_25 | AC | 134 ms
92,852 KB |
testcase_26 | AC | 138 ms
92,784 KB |
testcase_27 | RE | - |
testcase_28 | RE | - |
testcase_29 | RE | - |
testcase_30 | AC | 145 ms
92,960 KB |
testcase_31 | RE | - |
testcase_32 | RE | - |
testcase_33 | RE | - |
testcase_34 | RE | - |
testcase_35 | RE | - |
testcase_36 | AC | 154 ms
93,056 KB |
testcase_37 | RE | - |
testcase_38 | AC | 112 ms
92,304 KB |
testcase_39 | RE | - |
testcase_40 | RE | - |
testcase_41 | RE | - |
testcase_42 | AC | 181 ms
93,116 KB |
testcase_43 | AC | 173 ms
92,964 KB |
testcase_44 | RE | - |
testcase_45 | RE | - |
testcase_46 | RE | - |
testcase_47 | RE | - |
testcase_48 | RE | - |
testcase_49 | RE | - |
testcase_50 | RE | - |
testcase_51 | RE | - |
testcase_52 | RE | - |
testcase_53 | AC | 127 ms
92,864 KB |
testcase_54 | RE | - |
testcase_55 | AC | 165 ms
93,340 KB |
testcase_56 | AC | 116 ms
92,380 KB |
testcase_57 | RE | - |
testcase_58 | AC | 190 ms
93,868 KB |
testcase_59 | RE | - |
testcase_60 | AC | 166 ms
93,212 KB |
testcase_61 | RE | - |
testcase_62 | RE | - |
testcase_63 | AC | 123 ms
92,716 KB |
testcase_64 | RE | - |
testcase_65 | RE | - |
testcase_66 | AC | 126 ms
92,596 KB |
testcase_67 | RE | - |
testcase_68 | RE | - |
testcase_69 | RE | - |
testcase_70 | RE | - |
testcase_71 | RE | - |
testcase_72 | AC | 117 ms
92,540 KB |
testcase_73 | RE | - |
testcase_74 | AC | 143 ms
92,704 KB |
testcase_75 | RE | - |
testcase_76 | RE | - |
testcase_77 | AC | 125 ms
92,380 KB |
testcase_78 | AC | 151 ms
92,996 KB |
testcase_79 | AC | 167 ms
93,392 KB |
testcase_80 | AC | 125 ms
92,840 KB |
testcase_81 | RE | - |
testcase_82 | RE | - |
testcase_83 | RE | - |
testcase_84 | RE | - |
testcase_85 | AC | 133 ms
92,148 KB |
testcase_86 | AC | 199 ms
93,512 KB |
testcase_87 | RE | - |
testcase_88 | RE | - |
testcase_89 | AC | 144 ms
92,908 KB |
testcase_90 | AC | 135 ms
92,384 KB |
testcase_91 | RE | - |
testcase_92 | RE | - |
testcase_93 | RE | - |
testcase_94 | AC | 121 ms
92,540 KB |
testcase_95 | RE | - |
testcase_96 | RE | - |
testcase_97 | RE | - |
testcase_98 | RE | - |
testcase_99 | AC | 123 ms
91,980 KB |
ソースコード
# import pypyjit;pypyjit.set_param("max_unroll_recursion=-1") # from bisect import * # from collections import * # from heapq import * # from itertools import * # from math import * # from datetime import * # from decimal import * # PyPyだと遅い # from string import ascii_lowercase, ascii_uppercase # import numpy as np import sys import os # sys.setrecursionlimit(10**6) # PyPyだと遅い INF = 10**18 MOD = 998244353 # MOD = 10**9 + 7 isTest = os.path.exists("input.txt") File = open("input.txt", "r") if isTest else sys.stdin def input(): return File.readline()[:-1] # /////////////////////////////////////////////////////////////////////////// if isTest: P = list(map(int, input().split())) outFile = open("output.txt", "w") # 盤面を動かす関数 def moveGrid(grid): for i in range(1, 60): for j in range(25): grid[i - 1][j] = grid[i][j] if i == 59: grid[i][j] = (0, 0, 0) # 敵までの距離を求める関数 def distance(grid, now): for i in range(60): if grid[i][now][0]: return i return 59 me = 12 move = ["S", "R", "L"] score = 0 total_power = 0 grid = [[(0, 0, 0) for _ in range(25)] for _ in range(60)] while True: n = int(input()) if n == -1: break enemy = [list(map(int, input().split())) for _ in range(n)] moveGrid(grid) for h, p, x in enemy: grid[59][x] = (h, p, h) ans = 0 dist = distance(grid, me) if grid[dist][me][0] > dist * (total_power // 100 + 1): if me == 0: ans = 1 elif me == 24: ans = -1 else: distL = distance(grid, me - 1) - 1 distR = distance(grid, me + 1) - 1 if grid[distL][me - 1][0] > distL * (total_power // 100 + 1): ans = 1 else: ans = -1 else: grid[dist][me] = ( grid[dist][me][0] - (total_power // 100 + 1), grid[dist][me][1], grid[dist][me][2], ) if grid[dist][me][0] <= 0: score += grid[dist][me][2] total_power += grid[dist][me][1] grid[dist][me] = (0, 0, 0) me = me + ans # print(me) if isTest: outFile.write(move[ans] + "\n") else: print(move[ans], flush=True) if isTest: outFile.close()