#C2788. Processing File System Events
Processing File System Events
Processing File System Events
You are given a list of file system events where each event is represented as a string in the format:
\(\texttt{ACTION TYPE PATH}\)
For example: "CREATE FILE /home/user/docs/file1.txt". Your task is to process each event by removing the TYPE
field so that the output event is in the format:
\(\texttt{ACTION PATH}\)
Note that PATH
may contain spaces. The input starts with an integer n denoting the number of events, followed by n lines each containing an event. Print the processed events each on a new line.
inputFormat
The first line of the input contains an integer \(n\) representing the number of events.
The next \(n\) lines each contain an event string in the format: \(ACTION TYPE PATH\)
.
outputFormat
Output \(n\) lines. Each line should contain the processed event in the format: \(ACTION PATH\)
, where the TYPE
field has been removed.
1
CREATE FILE /home/user/docs/file1.txt
CREATE /home/user/docs/file1.txt
</p>