@@ -0,0 +1,1976 @@
+import java.util.*;%0Aimport java.io.*;%0Aimport java.math.*;%0A%0A/**%0A * Auto-generated code below aims at helping you parse%0A * the standard input according to the problem statement.%0A * ---%0A * Hint: You can use the debug stream to print initialTX and initialTY, if Thor seems not follow your orders.%0A **/%0Aclass Player %7B%0A%0A    public static void main(String args%5B%5D) %7B%0A        Scanner in = new Scanner(System.in);%0A        int lightX = in.nextInt(); // the X position of the light of power%0A        int lightY = in.nextInt(); // the Y position of the light of power%0A        int initialTX = in.nextInt(); // Thor's starting X position%0A        int initialTY = in.nextInt(); // Thor's starting Y position%0A        %0A        int thorY = initialTY;%0A        int thorX = initialTX;%0A%0A        // game loop%0A        while (true) %7B%0A            int remainingTurns = in.nextInt(); // The remaining amount of turns Thor can move. Do not remove this line.%0A            System.err.println(%22Light X: %22 + lightX);%0A            System.err.println(%22Light Y: %22 + lightY);%0A            System.err.println(%22Thor X: %22 + thorX);%0A            System.err.println(%22Thor Y: %22 + thorY);%0A            %0A            String directionY = %22%22;%0A            String directionX = %22%22;%0A            %0A            if (thorY %3C lightY) %7B%0A                directionY = %22S%22;%0A                thorY += 1;%0A            %7D else if (thorY %3E lightY) %7B%0A                directionY = %22N%22;%0A                thorY -= 1;%0A            %7D%0A            %0A            if (thorX %3E lightX) %7B%0A                directionX = %22W%22;%0A                thorX -= 1;%0A            %7D else if (thorX %3C lightX) %7B%0A                directionX = %22E%22;%0A                thorX += 1;%0A            %7D%0A                %0A%0A            // Write an action using System.out.println()%0A            // To debug: System.err.println(%22Debug messages...%22);%0A%0A%0A            // A single line providing the move to be made: N NE E SE S SW W or NW%0A            System.out.println(directionY + directionX);%0A        %7D%0A    %7D%0A%7D

Add Java sourcecode PowerOfThor