結果
問題 | No.5017 Tool-assisted Shooting |
ユーザー | tebanya |
提出日時 | 2023-07-16 18:56:23 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 128 ms / 2,000 ms |
コード長 | 2,301 bytes |
コンパイル時間 | 1,815 ms |
コンパイル使用メモリ | 171,316 KB |
実行使用メモリ | 64,760 KB |
スコア | 61,573 |
平均クエリ数 | 430.67 |
最終ジャッジ日時 | 2023-07-16 18:58:52 |
合計ジャッジ時間 | 17,397 ms |
ジャッジサーバーID (参考情報) |
judge17 / judge15 |
純コード判定しない問題か言語 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 112 ms
64,160 KB |
testcase_01 | AC | 92 ms
63,996 KB |
testcase_02 | AC | 103 ms
64,240 KB |
testcase_03 | AC | 114 ms
64,760 KB |
testcase_04 | AC | 119 ms
63,928 KB |
testcase_05 | AC | 94 ms
64,320 KB |
testcase_06 | AC | 86 ms
64,700 KB |
testcase_07 | AC | 95 ms
64,232 KB |
testcase_08 | AC | 88 ms
64,068 KB |
testcase_09 | AC | 105 ms
64,552 KB |
testcase_10 | AC | 101 ms
64,112 KB |
testcase_11 | AC | 116 ms
64,128 KB |
testcase_12 | AC | 95 ms
63,916 KB |
testcase_13 | AC | 98 ms
64,444 KB |
testcase_14 | AC | 110 ms
64,064 KB |
testcase_15 | AC | 88 ms
64,596 KB |
testcase_16 | AC | 87 ms
64,412 KB |
testcase_17 | AC | 118 ms
64,072 KB |
testcase_18 | AC | 89 ms
64,352 KB |
testcase_19 | AC | 91 ms
63,888 KB |
testcase_20 | AC | 119 ms
64,100 KB |
testcase_21 | AC | 103 ms
64,400 KB |
testcase_22 | AC | 105 ms
64,592 KB |
testcase_23 | AC | 127 ms
63,988 KB |
testcase_24 | AC | 98 ms
64,120 KB |
testcase_25 | AC | 94 ms
64,368 KB |
testcase_26 | AC | 116 ms
64,660 KB |
testcase_27 | AC | 93 ms
63,964 KB |
testcase_28 | AC | 102 ms
64,432 KB |
testcase_29 | AC | 91 ms
64,548 KB |
testcase_30 | AC | 98 ms
64,500 KB |
testcase_31 | AC | 90 ms
64,308 KB |
testcase_32 | AC | 89 ms
63,860 KB |
testcase_33 | AC | 91 ms
64,024 KB |
testcase_34 | AC | 90 ms
64,468 KB |
testcase_35 | AC | 92 ms
64,384 KB |
testcase_36 | AC | 105 ms
64,136 KB |
testcase_37 | AC | 101 ms
64,456 KB |
testcase_38 | AC | 124 ms
64,268 KB |
testcase_39 | AC | 97 ms
64,052 KB |
testcase_40 | AC | 112 ms
64,032 KB |
testcase_41 | AC | 88 ms
64,148 KB |
testcase_42 | AC | 110 ms
63,928 KB |
testcase_43 | AC | 115 ms
64,448 KB |
testcase_44 | AC | 96 ms
64,096 KB |
testcase_45 | AC | 91 ms
64,600 KB |
testcase_46 | AC | 93 ms
64,364 KB |
testcase_47 | AC | 100 ms
64,540 KB |
testcase_48 | AC | 95 ms
64,488 KB |
testcase_49 | AC | 113 ms
63,912 KB |
testcase_50 | AC | 91 ms
63,896 KB |
testcase_51 | AC | 92 ms
64,144 KB |
testcase_52 | AC | 97 ms
63,964 KB |
testcase_53 | AC | 93 ms
64,132 KB |
testcase_54 | AC | 90 ms
64,524 KB |
testcase_55 | AC | 116 ms
63,944 KB |
testcase_56 | AC | 88 ms
64,020 KB |
testcase_57 | AC | 120 ms
63,940 KB |
testcase_58 | AC | 113 ms
63,908 KB |
testcase_59 | AC | 91 ms
64,728 KB |
testcase_60 | AC | 105 ms
64,228 KB |
testcase_61 | AC | 112 ms
64,096 KB |
testcase_62 | AC | 96 ms
64,244 KB |
testcase_63 | AC | 92 ms
64,112 KB |
testcase_64 | AC | 88 ms
64,340 KB |
testcase_65 | AC | 92 ms
64,560 KB |
testcase_66 | AC | 98 ms
64,440 KB |
testcase_67 | AC | 109 ms
63,948 KB |
testcase_68 | AC | 98 ms
64,108 KB |
testcase_69 | AC | 92 ms
64,336 KB |
testcase_70 | AC | 88 ms
64,756 KB |
testcase_71 | AC | 120 ms
63,880 KB |
testcase_72 | AC | 125 ms
64,416 KB |
testcase_73 | AC | 97 ms
64,052 KB |
testcase_74 | AC | 122 ms
64,144 KB |
testcase_75 | AC | 90 ms
64,620 KB |
testcase_76 | AC | 93 ms
64,408 KB |
testcase_77 | AC | 94 ms
64,572 KB |
testcase_78 | AC | 103 ms
64,172 KB |
testcase_79 | AC | 106 ms
64,448 KB |
testcase_80 | AC | 92 ms
64,260 KB |
testcase_81 | AC | 96 ms
64,524 KB |
testcase_82 | AC | 97 ms
64,432 KB |
testcase_83 | AC | 128 ms
64,672 KB |
testcase_84 | AC | 104 ms
64,108 KB |
testcase_85 | AC | 96 ms
64,588 KB |
testcase_86 | AC | 103 ms
64,332 KB |
testcase_87 | AC | 95 ms
64,752 KB |
testcase_88 | AC | 92 ms
63,936 KB |
testcase_89 | AC | 93 ms
64,272 KB |
testcase_90 | AC | 93 ms
64,036 KB |
testcase_91 | AC | 88 ms
64,000 KB |
testcase_92 | AC | 95 ms
64,052 KB |
testcase_93 | AC | 92 ms
64,360 KB |
testcase_94 | AC | 112 ms
64,028 KB |
testcase_95 | AC | 104 ms
64,312 KB |
testcase_96 | AC | 114 ms
64,352 KB |
testcase_97 | AC | 98 ms
64,552 KB |
testcase_98 | AC | 88 ms
64,004 KB |
testcase_99 | AC | 91 ms
64,180 KB |
ソースコード
#include <bits/stdc++.h> #include <stdlib.h> #include <time.h> using namespace std; #define ll long long #define all(x) (x).begin(), (x).end() #define yes "Yes" #define no "No" #define ret return #define xin cin #define cpit cout #define farg frag #define fix(x) fixed << setprecision(x) #define fore(p, v) for (auto &p : v) #define mp(a, b) make_pair(a, b) #define mt(a, b, c) make_tuple(a, b, c) #define rep(i, l, r) for (ll i = (l); i < (r); i++) #define inf ((1LL << 62) - (1LL << 31)) #define built(bit) __builtin_popcount(bit) #define Pi 3.14159265 ll mod = 1e9 + 7; int main() { ll turn = 0; ll level = 1; ll EXP = 0; ll T = 1000; ll Now_X = 12; vector<vector<ll>> Board(1e5, vector<ll>(25, 0)); vector<vector<ll>> Point(1e5, vector<ll>(25, 0)); while (T--) { ll N; cin >> N; if (N == -1) break; vector<ll> H(N), P(N), X(N); for (ll i = 0; i < N; i++) { cin >> H[i] >> P[i] >> X[i]; Board[turn + 59][X[i]] += H[i]; Point[turn + 59][X[i]] += P[i]; } bool frag = 0; for (ll i = 1; i <= 59; i++) { if (Board[turn + i][Now_X] > i * ((EXP / 100) + 1)) { Now_X = (Now_X + 1) % 25; cout << 'R' << endl; frag = 1; Board[turn + i][Now_X] -= (EXP / 100) + 1; if (Board[turn + i][Now_X] == 0) EXP += Point[turn + i][Now_X]; break; } if (Board[turn + i][Now_X] != 0) { Board[turn + i][Now_X] -= (EXP / 100) + 1; if (Board[turn + i][Now_X] == 0) EXP += Point[turn + i][Now_X]; break; } } if (frag) continue; if (Board[turn + 1][Now_X] == 0) { cout << 'S' << endl; } else if (Board[turn + 1][(Now_X + 1) % 25] == 0) { cout << 'R' << endl; Now_X = (Now_X + 1) % 25; } else if (Board[turn + 1][(Now_X + 24) % 25] == 0) { cout << 'L' << endl; Now_X = (Now_X + 24) % 25; } else break; turn++; } }