コード例 #1
0
    static void Main(string[] args) {
        int N = int.Parse(Console.ReadLine());
        Game game = new Game();
        for (int i = 0; i < N; i++) {
            string[] inputs = Console.ReadLine().Split(' ');
            int J = int.Parse(inputs[0]);//Starting day
            int D = int.Parse(inputs[1]);//Reservation length
            game.AddReservation(new Reservation(J, D));
        }

        // Write an action using Console.WriteLine()
        // To debug: Console.Error.WriteLine("Debug messages...");

        Console.WriteLine(game.Solve());
    }