2 import java
.io
.FileNotFoundException
;
4 import java
.io
.IOException
;
5 import java
.io
.PrintWriter
;
8 * @author Denis Kuznetsov
10 public class headshot_dk
{
12 public static void main(String
[] args
) throws IOException
{
13 new headshot_dk().go();
16 void go() throws IOException
{
17 Scanner in
= new Scanner(new File("headshot.in"));
18 ArrayList
<Integer
> shots
= new ArrayList
<Integer
>();
22 while (in
.hasNextInt()) {
23 int shot
= in
.nextInt();
31 int twoBlanksInRow
= 0;
32 //Copy first element to the end, so it is easier to calculate # of "0 0" subsequence
33 shots
.add(shots
.get(0));
34 for (int i
= 0; i
< shots
.size() - 1; i
++) {
35 if (shots
.get(i
) == 0) {
36 if (shots
.get(i
+ 1) == 0) {
42 // chance if rotate = # of blanks / # of shots.
43 // chance if shot = # of two blanks in row / # of blanks.
45 int diff
= blanks
* blanks
- twoBlanksInRow
* n
;
46 PrintWriter out
= new PrintWriter("headshot.out");
47 // PrintWriter out = new PrintWriter(System.out);
50 } else if (diff
> 0) {
51 out
.println("ROTATE");