#include #include #include using namespace std; int main() { int P[25]; for (int i = 0; i < 25; i++) { cin >> P[i]; } int level = 1; int score = 0; for (int turn = 0; turn < 1000; turn++) { int n; cin >> n; if (n == -1) { break; } vector h(n), p(n), x(n); for (int i = 0; i < n; i++) { cin >> h[i] >> p[i] >> x[i]; } // Move the player to the column with the closest enemy int closestEnemy = x[0]; for (int i = 1; i < n; i++) { if (abs(x[i] - 12) < abs(closestEnemy - 12)) { closestEnemy = x[i]; } } if (closestEnemy < 12) { cout << "L" << endl; } else if (closestEnemy > 12) { cout << "R" << endl; } else { cout << "S" << endl; } cout.flush(); // Update the level and score for (int i = 0; i < n; i++) { if (h[i] <= level) { score += h[i]; } } if (score >= 100) { level = 1 + score / 100; } } return 0; }