#K70052. Typing Speed Comparison

    ID: 33222 Type: Default 1000ms 256MiB

Typing Speed Comparison

Typing Speed Comparison

In this problem, you are given one or more test cases. Each test case consists of an integer n and a sequence of n integers representing typing speeds (in words per minute) for consecutive rounds. For each test case, you need to compare each speed with its previous speed.

For the first measurement, output N/A. For subsequent measurements, if the current speed is greater than the previous speed (i.e. if \(a_i > a_{i-1}\)), output faster; if it is less (i.e. \(a_i < a_{i-1}\)), output slower; and if they are equal (i.e. \(a_i = a_{i-1}\)), output same.

Print the comparison result for each test case on a separate line, with the outputs separated by a single space.

inputFormat

The first line of the input contains an integer (T), the number of test cases. For each test case, the first line contains an integer (n) representing the number of speed measurements, and the second line contains (n) space-separated integers representing the speeds.

outputFormat

For each test case, output a single line containing (n) space-separated strings. The first string is always "N/A". For each subsequent speed, output "faster" if the speed is higher than the previous one, "slower" if it is lower, and "same" if it is equal.## sample

2
4
50 60 55 55
3
70 70 80
N/A faster slower same

N/A same faster

</p>