Adding some more judges, here and there.
[andmenj-acm.git] / NEERC / headshot / headshot_gk.java
blob80d1626a23050e9fd9b747579bc978199cbe3d62
1 import java.util.*;
2 import java.io.*;
4 public class headshot_gk {
5 static Scanner in;
6 static PrintWriter out;
8 public void run() throws IOException {
9 char[] a = in.next().toCharArray();
10 char prev = a[a.length - 1];
11 int load = 0;
12 int load2 = 0;
13 for (char i : a) {
14 if (i == '1') {
15 load++;
16 if (prev == '1') {
17 load2++;
20 prev = i;
22 int z = load2 * a.length - load * load;
23 out.println(z == 0 ? "EQUAL" : z < 0 ? "ROTATE" : "SHOOT");
26 public static void main(String[] args) throws Exception {
27 in = new Scanner(new File("headshot.in"));
28 out = new PrintWriter("headshot.out");
30 new headshot_gk().run();
32 in.close();
33 out.close();