hiho week 65 register

Ended

Participants:3721

Verdict:Accepted
Score:100 / 100
Submitted:2015-09-27 14:15:11

Lang:C#

Edit
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
using System;
using System.Collections.Generic;
namespace Highway
{
    public class Program
    {
        static Cars carHead;
        static Cars[] orderCar;
        static int count = 0, T;
        static List<int> passY;
        static float[,] splitTime;
        static void Main(string[] args)
        {
            string line = Console.ReadLine();
            T = Convert.ToInt32(line);
            carHead = new Cars();
            orderCar = new Cars[T];
            passY = new List<int>(T);
            splitTime = new float[T, T];
            for (int i = 1; i <= T; i++)
            {
                putCars();
            }
            passY.Sort();
            Init();
            Run();
            for (int i = 0; i < T; i++)
                Console.WriteLine(string.Format("{0:f2}", orderCar[i].leavingTime));
        }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX