Increase cheating reserve bots' variety
[troll.git] / src / test / java / PlayerCheatSmart.java
1 import java.util.Random;
2 import java.util.Scanner;
3
4 public class PlayerCheatSmart {
5     public static void main(String[] args) {
6         Scanner in = new Scanner(System.in);
7         Random random = new Random();
8
9         int roadLength = in.nextInt();
10         int initialStones = in.nextInt();
11         in.nextLine();
12
13         while (true) {
14             int trollDistance = in.nextInt();
15             int stones = in.nextInt();
16             int opponentStones = in.nextInt();
17
18             int wantThrow = (roadLength - trollDistance + stones - 1) / stones;
19             int actualThrow = wantThrow > stones ? Integer.MIN_VALUE + 1
20                                                  : wantThrow;
21             System.out.println(actualThrow);
22         }
23     }
24 }