#C9571. Dungeon Morale Challenge

    ID: 53679 Type: Default 1000ms 256MiB

Dungeon Morale Challenge

Dungeon Morale Challenge

You are given a number of test cases. In each test case, you are provided with the number of days N, a threshold K representing the minimum treasures required per day, and a list of integers representing the number of treasures collected on each day.

Your task is to determine for each test case whether the adventurers maintained their dungeon morale over the entire period. If on any day the number of treasures collected is less than K, the morale is considered broken on that day, and you should output "FAILED d", where d is the 1-indexed day number when failure occurred. If the adventurers meet or exceed the required number every day, output "SUCCESS".

Note: All formulas and conditions are given in LaTeX style. For example, the condition is \( treasures_i \geq K \) for \( i = 1, 2, \ldots, N \).

inputFormat

The first line of the input contains an integer T, denoting the number of test cases.

For each test case, the first line contains two space-separated integers: N (the number of days) and K (the required minimum treasures per day).

The next line contains N space-separated integers, where each integer represents the number of treasures collected on that day.

outputFormat

For each test case, output a single line containing either "SUCCESS" if the adventurers collected at least K treasures every day, or "FAILED d" where d is the day (1-indexed) on which they first failed to collect at least K treasures.

## sample
1
3 10
12 15 13
SUCCESS