-
Notifications
You must be signed in to change notification settings - Fork 1
/
marsLander1.cs
47 lines (43 loc) · 1.71 KB
/
marsLander1.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Collections;
using System.Collections.Generic;
/**
* Auto-generated code below aims at helping you parse
* the standard input according to the problem statement.
**/
class Player
{
static void Main(String[] args)
{
string[] inputs;
int N = int.Parse(Console.ReadLine()); // the number of points used to draw the surface of Mars.
for (int i = 0; i < N; i++)
{
inputs = Console.ReadLine().Split(' ');
int LAND_X = int.Parse(inputs[0]); // X coordinate of a surface point. (0 to 6999)
int LAND_Y = int.Parse(inputs[1]); // Y coordinate of a surface point. By linking all the points together in a sequential fashion, you form the surface of Mars.
}
// game loop
while (true)
{
inputs = Console.ReadLine().Split(' ');
int X = int.Parse(inputs[0]);
int Y = int.Parse(inputs[1]);
int HS = int.Parse(inputs[2]); // the horizontal speed (in m/s), can be negative.
int VS = int.Parse(inputs[3]); // the vertical speed (in m/s), can be negative.
int F = int.Parse(inputs[4]); // the quantity of remaining fuel in liters.
int R = int.Parse(inputs[5]); // the rotation angle in degrees (-90 to 90).
int P = int.Parse(inputs[6]); // the thrust power (0 to 4).
// Write an action using Console.WriteLine()
// To debug: Console.Error.WriteLine("Debug messages...");
if(VS < -35 && Y < 1000 || VS < -45) {
Console.WriteLine("0 4");
} else {
Console.WriteLine("0 2");
}
}
}
}