#include #include #include #include using namespace std; /** * Auto-generated code below aims at helping you parse * the standard input according to the problem statement. * --- * Hint: You can use the debug stream to print initialTX and initialTY, if Thor seems not follow your orders. **/ int main() { int light_x; // the X position of the light of power int light_y; // the Y position of the light of power int initial_tx; // Thor's starting X position int initial_ty; // Thor's starting Y position cin >> light_x >> light_y >> initial_tx >> initial_ty; cin.ignore(); int posX=initial_tx; int posY=initial_ty; // game loop while (1) { int remaining_turns; // The remaining amount of turns Thor can move. Do not remove this line. cin >> remaining_turns; cin.ignore(); int dx; int dy; string move_x= ""; string move_y= ""; dx = light_x - posX; dy = light_y - posY; if (posX < light_x){ move_x = "E"; posX = posX +1; } else if (posX > light_x){ move_x = "W"; posX = posX -1; } if (posY > light_y){ move_y = "N"; posY = posY +1; }else if (posY