## 30 Mar PMCA Sunday 10:00 Practice -03.28

**Question:**

During this COVID19 outbreak, the gold price are very much unstable. Jack is very much tensed. He has asked Ken to analyze the gold price rate. Now Ken is given a report of N consecutive days containing gold price of those N consecutive days. Ken has to check for how many days (including the i_{th} day) the i_{th} price was greater than or equal to its previous consecutive days. He will report the final result for each given N days.

**Input Specification:**

First line of each input contains an integer T denoting the number of test cases.

First line of each test case contains an integer N denoting number of days for which Ken has to analyze.

Second line of each test case contains N space separated integer denoting gold price of each day

**Output Specification:**

For each test case print N space separated integers denoting the analysis the report.

**Constrains:**

1<=T<=100

1<=N<=105

1<=Price_{i}<=109

Sample Input1 5 10 5 4 15 25Sample Output1 1 1 4 5ExplanationIn this test case, First day price was itself greater than or equal to its previous day. For first day ans=1. For the second and third day, price is less than any previous day, so ans=1 for each of the day. For the fourth day, price = 15 which is greater than all previous days, so ans=4 For the fifth day, price = 25 which is greater than all previous days, so ans=5. So final answer for this test case is [1,1,1,4,5]

Sorry, the comment form is closed at this time.