#C6699. Project with Most Unique Employees

    ID: 50487 Type: Default 1000ms 256MiB

Project with Most Unique Employees

Project with Most Unique Employees

You are given a log of employee activities. Each log entry contains an employee ID, a project ID, and a date in the format \(YYYY-MM-DD\). Your task is to determine the project that has the highest number of unique employees working on it. In case of a tie, choose the project with the smallest project ID.

Mathematically, if \(E(p)\) is the set of employees who have worked on project \(p\), you need to find \[ p^* = \min \{ p : |E(p)| = \max_{q} |E(q)| \} \]

inputFormat

The first line contains an integer \(n\), the number of log entries. Each of the next \(n\) lines contains three space-separated values: an integer Employee ID, an integer Project ID, and a string Date in the format YYYY-MM-DD.

outputFormat

Output a single line containing the Project ID that has the largest number of unique employees. If there are no log entries, output "None".

## sample
7
101 1 2022-01-01
102 2 2022-01-02
103 1 2022-01-03
102 1 2022-01-04
104 3 2022-01-05
101 2 2022-01-06
105 3 2022-01-07
1