#K65302. Server Activity Log Summary

    ID: 32167 Type: Default 1000ms 256MiB

Server Activity Log Summary

Server Activity Log Summary

Your task is to implement an analytics tool that processes a server log file and summarizes the activity of server requests. Each log entry provides the month (as a three‐letter abbreviation), day, time (in HH:MM format), and request type (one of GET, POST, PUT, or DELETE). For each day that appears in the log file, you must count the number of requests for each type. The summary should only list request types that occur on that day.

The output must be organized by day (sorted first by month in calendar order and then by day in increasing order). For each day, print a header with the month followed by the day, and then print each request type and its count in lexicographical order.

Note that if a day has no log entries, it should be omitted from the summary.

The formula for ordering days is based on the month and day. If we denote the numerical equivalent of a month by \( m \) and the day by \( d \), then the sorting key is \( (m, d) \). Use the following mapping for months: \( \text{Jan}=1, \text{Feb}=2, \ldots, \text{Dec}=12 \).

inputFormat

The input consists of multiple lines, each representing a log entry formatted as:

<month> <day> <hour>:<minute> <request_type>

The input is terminated by an empty line.

outputFormat

For each day that appears in the logs, print the summary in the following format:

<month> <day>
<request_type>: <count>

The days must be printed in order sorted first by month (in calendar order) and then by day. For each day, the request types should be printed in lexicographical order.

## sample
Jan 1 13:45 GET

Jan 1

GET: 1

</p>