PROGRAMMING:Anti epidemic situation of scanning code
During COVID-19, we used the scan code and anti epidemic APP to manage the flow of people. This is a very convenient software, and it is easy to know a person's trajectory. Ximen of Guangxi University of science and technology also has a two-dimensional code. People need to scan the code when they go in and out. Now given some code scanning records, can you help to find how many people stay on campus at a specific time?
###Input format:
First, output two positive integers n and K in the first line, which are the number of in and out records and the number of queries, both of which are positive integers within 10000. After n lines, the in and out records are given in the following format:
Student number time status
The student number is composed of 10 digits, the time is given in HH: mm: SS format, 24-hour system, and the status includes two kinds of "in" and "out", which represent in and out respectively. Let's assume that all the time is limited to one day. Because someone is lazy and does not scan the code when entering or leaving, resulting in a large number of invalid data, each in data should be paired with his next out data. Any in data that is not paired with out data and out data that is not paired with in data should be regarded as invalid data. Ensure that there is at least one pair of valid data in the test data, and no one has the record of going in and out at the same time.
After K lines, K query time points are given in HH: mm: SS format, and the query time is given in ascending order.
###Output format:
For each query, output the number of people in the campus in a row. Assume that the number of people in the campus is 0 initially.
The last line outputs the student number and residence time of the students who have stayed in the campus for the longest time. The format of residence time is HH: mm: SS. If more than one person has the same residence time, all student numbers are output in ascending order according to the dictionary order, separated by spaces in the middle.
###Input example:
Here is a set of inputs. For example:
```in
16 7
2018040601 18:00:01 in
2017030211 11:30:08 out
2019050517 13:00:00 out
2018070889 23:59:50 out
2017040410 10:23:00 in
2017030211 04:09:59 in
2018040601 05:09:59 in
2018070889 11:42:01 out
2018040601 05:10:33 in
2018070889 06:30:50 in
2018040601 12:23:42 out
2018070889 23:55:00 in
2018040601 12:24:23 out
2017040410 17:11:22 out
2018040601 18:07:01 out
2019050517 06:30:50 in
05:10:00
06:30:50
11:00:00
12:23:42
14:00:00
18:00:00
23:59:00
```
###Output example:
The corresponding output is given here. For example:
```out
one
four
five
two
one
0
one
2017030211 2018040601 07:20:09
```
answer:If there is no answer, please comment
###Input format:
First, output two positive integers n and K in the first line, which are the number of in and out records and the number of queries, both of which are positive integers within 10000. After n lines, the in and out records are given in the following format:
Student number time status
The student number is composed of 10 digits, the time is given in HH: mm: SS format, 24-hour system, and the status includes two kinds of "in" and "out", which represent in and out respectively. Let's assume that all the time is limited to one day. Because someone is lazy and does not scan the code when entering or leaving, resulting in a large number of invalid data, each in data should be paired with his next out data. Any in data that is not paired with out data and out data that is not paired with in data should be regarded as invalid data. Ensure that there is at least one pair of valid data in the test data, and no one has the record of going in and out at the same time.
After K lines, K query time points are given in HH: mm: SS format, and the query time is given in ascending order.
###Output format:
For each query, output the number of people in the campus in a row. Assume that the number of people in the campus is 0 initially.
The last line outputs the student number and residence time of the students who have stayed in the campus for the longest time. The format of residence time is HH: mm: SS. If more than one person has the same residence time, all student numbers are output in ascending order according to the dictionary order, separated by spaces in the middle.
###Input example:
Here is a set of inputs. For example:
```in
16 7
2018040601 18:00:01 in
2017030211 11:30:08 out
2019050517 13:00:00 out
2018070889 23:59:50 out
2017040410 10:23:00 in
2017030211 04:09:59 in
2018040601 05:09:59 in
2018070889 11:42:01 out
2018040601 05:10:33 in
2018070889 06:30:50 in
2018040601 12:23:42 out
2018070889 23:55:00 in
2018040601 12:24:23 out
2017040410 17:11:22 out
2018040601 18:07:01 out
2019050517 06:30:50 in
05:10:00
06:30:50
11:00:00
12:23:42
14:00:00
18:00:00
23:59:00
```
###Output example:
The corresponding output is given here. For example:
```out
one
four
five
two
one
0
one
2017030211 2018040601 07:20:09
```
answer:If there is no answer, please comment