ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Турниры > IMPC - 2013-2014 > задача:


14-05-20. 50677 - The Cottage

IMPC - 2013-2014

Старт: 16.мар.2013 в 12:00:00
Финиш: 16.мар.2013 в 17:00:00
Турнир завершён!
• Турнирная таблица

Гость
• Вопросы к жюри (2)

Задачи турнира

• 14-03-70. s
• 14-03-80. 50675 - Kruja Boys
• 14-03-90. 50717 - Hurdle Jumping
• 14-04-20. 50493 - n-digit kth Prime ...
• 14-04-30. 50669 - Area of an Irregu...
• 14-04-40. 50712 - Moon algebra
• 14-04-50. 50697 - Base Stations
• 14-05-10. 50723 - Tribonacci
• 14-05-20. 50677 - The Cottage
• 14-05-20. 50413 - Valid Permutations
• 14-05-30. 50688 - Epoka Furgon
• 14-05-30. 50706 - The most crowd...
• 14-05-40. 50689 - The biggest build...
• 14-05-50. 50414 - Traffic
• 14-05-50. 50421 - Repairing road s...
• 14-05-60. 50371 - Modified Karnaug...
• 14-05-70. 50477 - Character Pyramids

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Question by Osman Ay.

The Cottage

Question:
Residents of Ankara go to the mountains in the sweltering days of summer. Mr. Moneysayar has a cottage at the mountains of Ankara. He rents his cottage to make money. The rental fee of the cottage is depending of the number of the rental days; ₺100 per day. Mr. Moneysayar has a list of the requests (starting and ending days) for the next twelve months. Make a program that calculates maximum amount of money Mr. Moneysayar can make for the next twelve months.

Input specification
The first line of the input contains a single integer N (1 ≤ N ≤ 1000) that is the number of the requests. Each of the following N lines denotes a request with two integers: a and b (0 ≤ a < b < 365) where, a is the starting day and b is the ending day and start and end days are included in the rent. One customer can check in the cottage only after the ending day of the previous customer.

Output specification
The output contains a single integer that is the maximum money that Mr. Moneysayar can make.

 Sample Input I     Sample Output I   
 5
 5 6
 1 3
 4 7
 7 9
 2 5
 800

Output specification
If the days 1-3, 5-6, and 7-9 are taken it makes ₺800


Для отправки решений необходимо выполнить вход.

www.contester.ru