SHARE
TWEET

Untitled

a guest May 26th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. #include <string.h>
  4.  
  5. /**
  6.  * Auto-generated code below aims at helping you parse
  7.  * the standard input according to the problem statement.
  8.  **/
  9.  
  10. int main()
  11. {
  12.  
  13.     // game loop
  14.     while (1) {
  15.         int x;
  16.         int y; // x position of the next check point
  17.         int nextCheckpointX; // y position of the next check point
  18.         int nextCheckpointY; // distance to the next checkpoint
  19.         int nextCheckpointDist; // angle between your pod orientation and the direction of the next checkpoint
  20.         int nextCheckpointAngle;
  21.         scanf("%d%d%d%d%d%d", &x, &y, &nextCheckpointX, &nextCheckpointY, &nextCheckpointDist, &nextCheckpointAngle);
  22.         int opponentX;
  23.         int opponentY;
  24.         scanf("%d%d", &opponentX, &opponentY);
  25.  
  26.         // Write an action using printf(). DON'T FORGET THE TRAILING \n
  27.         // To debug: fprintf(stderr, "Debug messages...\n");
  28.  
  29.  
  30.         // You have to output the target position
  31.         // followed by the power (0 <= thrust <= 100)
  32.         // i.e.: "x y thrust"
  33.         if ( nextCheckpointAngle > 90 || nextCheckpointAngle < -90)
  34.             printf("%d %d 45\n", nextCheckpointX, nextCheckpointY);
  35.         else
  36.             printf("%d %d BOOST\n", nextCheckpointX, nextCheckpointY);
  37.     }
  38.  
  39.     return 0;
  40. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top