Time limit
2s
Memory limit
128 MB
There are N axis-aligned rectangles on a two-dimensional coordinate plane. The rectangles are numbered from 1 to N. Rectangle i has lower-left corner (x_i,1, y_i,1) and upper-right corner (x_i,2, y_i,2).
Choose exactly K of the N rectangles to color. If a region is covered by one or more rectangles, only the rectangle with the largest number among those covering that region is visible. The colored area is the total visible area belonging to the chosen rectangles. Find a choice that maximizes the colored area.
The first line contains two integers N and K.
Each of the next N lines contains four integers x_i,1, y_i,1, x_i,2, and y_i,2, describing one rectangle.
Print the numbers of the K rectangles to color, in increasing order, separated by spaces. If several choices maximize the colored area, print the lexicographically smallest sequence.
1 <= K <= N <= 50-10000 <= x_i,1, y_i,1, x_i,2, y_i,2 <= 10000x_i,1 < x_i,2y_i,1 < y_i,2