301265: CF237A. Free Cash
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Free Cash
题意翻译
现在给定 $n$ 个二元组 $(x,y)$。 求出现次数最多的二元组 $(x,y)$ 的出现次数。 注意:$(x,y)$ 按从小到大给出。 感谢 @[wkjwkj](/user/240405) 提供的翻译。题目描述
Valera runs a 24/7 fast food cafe. He magically learned that next day $ n $ people will visit his cafe. For each person we know the arrival time: the $ i $ -th person comes exactly at $ h_{i} $ hours $ m_{i} $ minutes. The cafe spends less than a minute to serve each client, but if a client comes in and sees that there is no free cash, than he doesn't want to wait and leaves the cafe immediately. Valera is very greedy, so he wants to serve all $ n $ customers next day (and get more profit). However, for that he needs to ensure that at each moment of time the number of working cashes is no less than the number of clients in the cafe. Help Valera count the minimum number of cashes to work at his cafe next day, so that they can serve all visitors.输入输出格式
输入格式
The first line contains a single integer $ n $ $ (1<=n<=10^{5}) $ , that is the number of cafe visitors. Each of the following $ n $ lines has two space-separated integers $ h_{i} $ and $ m_{i} $ $ (0<=h_{i}<=23; 0<=m_{i}<=59) $ , representing the time when the $ i $ -th person comes into the cafe. Note that the time is given in the chronological order. All time is given within one 24-hour period.
输出格式
Print a single integer — the minimum number of cashes, needed to serve all clients next day.
输入输出样例
输入样例 #1
4
8 0
8 10
8 10
8 45
输出样例 #1
2
输入样例 #2
3
0 12
10 11
22 22
输出样例 #2
1