Why I am getting WA in SUPW Problem Code: ZCO14002

Problem link :problem
My solution.
Please give some good test cases to find where i am wrong.

help me please

help me please

your code is printing 0 for

 test case 1 : 
1
3
 test case 2 : 
2 
3 1

which is undesirable …
It should be printing a[0] for n=1
min(a[0],a[1]) for n=2