DS-S95-CA1-2
Time Limit: 1 Second Memory Limit: 4096 KB
You can find the related question in the course page.Input
In the first line, there will be given an integer t which is the number of test cases.The second line contains space-separated integers n, w, g, m. which are described in the question. The next line contains n space-separated integers which respectively the capacity of i'th glass.Output
You should print "YES! Eternal Redemption" if the job can be done, or " NO! Chaos Ensues" if not, per line which is the answer to the corresponding test case.Sample Input
2 1 1 10 9 1 9 3 5 8 10 1 3 2 6 2 7 8 3
Sample Output
YES! Eternal Redemption NO! Chaos EnsuesSubmit