﻿ Fuzhou University OnlineJudge ﻿
Problem 1737 IP attack

## Problem Description

TCP/IP protocol is the basis of Internet protocol, so the improvement of TCP/IP protocol is very necessary. Since the initial TCP / IP protocol does not take into account there are so many network threats today, resulting in a number of various forms of attack. Generally speaking, we will be powerless to prevent the attack against the protocol agreement (especially DDOS).
Many web servers may use a daily log to record IP information when the users logged on; we can determine whether certain IP attacks our site through these logs.
Here, we simplify the formation of log records, each record is as follows:
The formation of IP address is as follows:
X.X.X.X, where 0≤X≤255
The formation of time is as follows:
H:M:S, where H is hour, M is minute, S is second (0≤S<60,0≤M<60,0≤H<128,it’s Mars clock. ;) ).
If in a certain period of time L [t,t+L-1] (In seconds), the number of visit times is not less than G, we can determine this IP is attack-IP.
You should calculate all attack-IPs.

## Input

There are multiple test cases. For each test case, the first line contains three integers N,L,G(1≤N≤100,000，2≤L≤86,400，2≤G≤100). N is the number of IP records. If in a certain period of time L, the number of visit times is not less than G, we can determine this IP is attack-IP. The next N lines, each line contains an IP record, the input IP records are order by visit time and each IP record is legal, all records are in a day.

## Output

For each test case, output all attack-IPs by the input order.

## Sample Input

13 15 2 218.66.14.2 00:00:01 218.66.14.1 00:00:01 218.66.14.13 00:00:01 218.66.14.25 00:00:08 218.66.14.25 00:00:09 218.66.14.1 00:00:16 218.66.14.2 00:00:17 218.66.14.2 00:00:18 218.66.14.3 00:00:19 218.66.14.2 00:00:25 218.66.14.3 00:00:33 218.66.14.25 23:00:08 218.66.14.25 23:00:10

## Sample Output

218.66.14.2 218.66.14.25 218.66.14.3

## Source

FZU 2009 Summer Training Qualification -- Hero Revival 3

Submit  Back  Status  Discuss
﻿