There are multiple test cases in the input file, terminated by EOF.
The first line contains an integer N (N<=200000), the number of companies that have applied for renting the auditorium. Lines 2 to N+1 contain two integers.
The integers on line i+1 are the starting and ending dates for the request from company i.
For each
company’s request, the starting day is always greater than or equal to 1 and
the ending day never exceeds 109
.
The first line of the output should consist of an integer M, the maximum
number of companies to which the auditorium can be rented. This should be
followed by a line containing M integers listing the identities of the companies
that appear in the lexicographically smallest such set.
4 4 9 9 11 13 19 10 17 4 4 9 9 11 13 19 10 17
2 1 3 2 1 3
Migrated from old NTUJ.
APIO'09, problem 2
No. | Testdata Range | Score |
---|