#P8661. Hot Posts
Hot Posts
Hot Posts
You are given a log of likes on a programmer forum with entries. Each entry is in the format ts id
, indicating that the post with id id
received a like at time . Also given are two integers and . A post is considered hot if there exists a time such that the post receives at least likes in the time interval (note that the interval is left-closed and right-open).
Your task is to determine all post IDs that have ever been hot.
inputFormat
The first line contains three integers , , and . Each of the next lines contains two integers and , representing that post received a like at time .
outputFormat
Output the post IDs that have been hot in ascending order, separated by spaces. If no post satisfies the condition, output an empty line.
sample
6 10 3
1 101
3 102
5 101
10 101
11 102
14 101
101