Below is the text of the page https://pc-ua.com.ua/page2319.html stored 2008-10-09 by archive.org.ua. The original page over time could change. View as original html

Задача B

Итоги олимпиады 2005 года -> Задачи пробного тура - Задача B [page2288.html] Ваш браузер не поддерживает JavaScript! Альтернативная версия меню без JavaScript здесь Итоги олимпиады 2005 года -> Задачи пробного тура Задача B Sum B Rectangles (2 sec) Input file: B.IN Output: Standard output Different colour rectangles are situated on plane. Each side of rectangles are parallel to one of the system axes (abscissa or ordinate). Some rectangles can lie on some another rectangles, but their borders never intersect. The colour of the intersection area of different rectangles equals to sequence, formed from the colours of the rectangles witch combine this area. You need to determine the colour of the area consist maximum number of colours. Input : The first line of the input file will contain only the number N of the test cases. The first line of each test case contains the number of rectangles K(1<= K <=2000) . So the next K lines contain such information: the coordinate of left – top corner of the rectangle, its height, width and colour of it (coordinate type – real, colour - range from 0 to 32000). Output: The first line of each output case is number of colours. The next lines contain the colour sequence sorted on increase. If there is an alternate solution, print all of them. Then empty line follows. Input Output 2 4 1.0 10.0 5.0 8.0 1 2.0 9.0 3.0 4.0 15 3.0 8.0 1.0 2.0 6 2.0 4.0 3.0 1.0 2 3 1.0 6.0 6.1234 5.0 1 2.0 5.0 2.0 2.0 8 5.0 5.0 2.0 3.0 15 3 1 6 15 2 1 8 1 15 Developed by Deep Vision