#K95302. Increasing Sales Analysis
Increasing Sales Analysis
Increasing Sales Analysis
You are given one or more datasets, each containing information about employee quarterly sales. Each dataset starts with an integer n indicating the number of employees, followed by n lines where each line contains an employee's name and four integers representing sales figures in consecutive quarters. Each dataset is terminated by a line with the string END
.
Your task is to identify, for every dataset, the employees whose sales figures are strictly increasing, i.e., \(q_1 < q_2 < q_3 < q_4\). If a dataset does not contain any employee with strictly increasing sales, output None
for that dataset. In the final output, merge the results of all datasets sequentially, each on its own line.
inputFormat
The input is provided via standard input (stdin) and consists of one or more datasets. Each dataset is formatted as follows:
n Name1 q1 q2 q3 q4 Name2 q1 q2 q3 q4 ... (n lines) END
For example:
3 Alice 5 6 7 8 Bob 3 4 5 6 Charlie 4 5 6 7 END
outputFormat
For each dataset, output via standard output (stdout) the names of the employees with strictly increasing sales (i.e., \(q_1 < q_2 < q_3 < q_4\)), in the order they appear in the input. If no employee qualifies in a dataset, output None
. The results for multiple datasets should be concatenated together, each output on a new line.
3
Alice 5 6 7 8
Bob 3 4 5 6
Charlie 4 5 6 7
END
Alice
Bob
Charlie
</p>