Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- /**
- * Auto-generated code below aims at helping you parse
- * the standard input according to the problem statement.
- **/
- int main()
- {
- // game loop
- while (1) {
- int x;
- int y; // x position of the next check point
- int nextCheckpointX; // y position of the next check point
- int nextCheckpointY; // distance to the next checkpoint
- int nextCheckpointDist; // angle between your pod orientation and the direction of the next checkpoint
- int nextCheckpointAngle;
- scanf("%d%d%d%d%d%d", &x, &y, &nextCheckpointX, &nextCheckpointY, &nextCheckpointDist, &nextCheckpointAngle);
- int opponentX;
- int opponentY;
- scanf("%d%d", &opponentX, &opponentY);
- // Write an action using printf(). DON'T FORGET THE TRAILING \n
- // To debug: fprintf(stderr, "Debug messages...\n");
- // You have to output the target position
- // followed by the power (0 <= thrust <= 100)
- // i.e.: "x y thrust"
- if ( nextCheckpointAngle > 90 || nextCheckpointAngle < -90)
- printf("%d %d 45\n", nextCheckpointX, nextCheckpointY);
- else
- printf("%d %d BOOST\n", nextCheckpointX, nextCheckpointY);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement