-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCSharp.cs
37 lines (34 loc) · 1.46 KB
/
CSharp.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
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Collections;
using System.Collections.Generic;
class Player
{
static void Main(string[] args)
{
string[] inputs;
int surfaceN = int.Parse(Console.ReadLine()); // the number of points used to draw the surface of Mars.
for (int i = 0; i < surfaceN; i++)
{
inputs = Console.ReadLine().Split(' ');
int landX = int.Parse(inputs[0]); // X coordinate of a surface point. (0 to 6999)
int landY = 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 hSpeed = int.Parse(inputs[2]); // the horizontal speed (in m/s), can be negative.
int vSpeed = int.Parse(inputs[3]); // the vertical speed (in m/s), can be negative.
int fuel = int.Parse(inputs[4]); // the quantity of remaining fuel in liters.
int rotate = int.Parse(inputs[5]); // the rotation angle in degrees (-90 to 90).
int power = int.Parse(inputs[6]); // the thrust power (0 to 4).
if (vSpeed <= -40) { Console.WriteLine("0 4"); }
else if (vSpeed > -40) { Console.WriteLine("0 0"); }
}
}
}