Cyber-Cafe

4

1 votes
Problem

Bhavika has decided to open a new cybercafe in her locality but has no idea how many computers will be sufficient. So she decided to start with a few computers and will purchase new ones if needed.

She can't maintain a record of people at each moment to find the requirement but she has recorded the visiting and leaving time of each person for the past few days and want to invest according to the past record.

Help her to find if the computers she has are sufficient or she needs more.

Input format

First-line contains n and m the no. of persons visited on a day and no. of computers she already had. Next line contains visiting time of n persons and second line cntain leaving time of n persons.

0<n,m<100

1<k<10^5

Output format

Print the minimum number of computers she needs to purchase such that no person has to wait.

Note: format of time eg.11:30 will be represented as 1130.

Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?