Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- **
- * Auto-generated code below aims at helping you parse
- * the standard input according to the problem statement.
- **/
- const laps = parseInt(readline());
- const checkpointCount = parseInt(readline());
- const tgs = [];
- for (let i = 0; i < checkpointCount; i++) {
- var inputs = readline().split(' ');
- const checkpointX = parseInt(inputs[0]);
- const checkpointY = parseInt(inputs[1]);
- tgs.push({
- x: checkpointX,
- y: checkpointY
- });
- }
- // game loop
- while (true) {
- let tx, ty;
- let x, y;
- let vx, vy;
- let tx2, ty2;
- let x2, y2;
- for (let i = 0; i < 2; i++) {
- var inputs = readline().split(' ');
- x = parseInt(inputs[0]); // x position of your pod
- y = parseInt(inputs[1]); // y position of your pod
- vx = parseInt(inputs[2]); // x speed of your pod
- vy = parseInt(inputs[3]); // y speed of your pod
- const angle = parseInt(inputs[4]); // angle of your pod
- const nextCheckPointId = parseInt(inputs[5]); // next check point id of your pod
- tx = tgs[nextCheckPointId].x;
- ty = tgs[nextCheckPointId].y;
- console.error(nextCheckPointId);
- }
- for (let i = 0; i < 2; i++) {
- var inputs = readline().split(' ');
- x2 = parseInt(inputs[0]); // x position of the opponent's pod
- y2 = parseInt(inputs[1]); // y position of the opponent's pod
- const vx2 = parseInt(inputs[2]); // x speed of the opponent's pod
- const vy2 = parseInt(inputs[3]); // y speed of the opponent's pod
- const angle2 = parseInt(inputs[4]); // angle of the opponent's pod
- const nextCheckPointId2 = parseInt(inputs[5]); // next check point id of the opponent's pod
- tx2 = tgs[checkpointCount - 1].x;
- ty2 = tgs[checkpointCount - 1].y;
- }
- // Write an action using console.log()
- // To debug: console.error('Debug messages...');
- // You have to output the target position
- // followed by the power (0 <= thrust <= 100)
- // i.e.: "x y thrust"
- console.log(tx , ' ', ty, ' 100');
- console.log('0' , ' ', '0', ' 100');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement