Actually I have solved Question COVID19 and it gave correct output on given test case but it is still showing WA. Can anybody please tell me my mistake in code or the the test case which i am not considering.
I am here attaching link to question and my code
Your code gives wrong output for : 1 4 1 3 5 9
Output should be : 1 3
Your output : 3 3
if 4th person is infected , then minimum would be 1 .
You can refer my solution : https://www.codechef.com/viewsolution/32531447
Thanks archit for replying,but still I have a doubt. In question constaint is given like
X1<X2<X3… but the test case as suggested by you 1 4 1 3 5 9 here this constraint is not followed.
1 3 5 9
Constraint is followed as here , x1=1 , x2 = 3 , x3 = 5 , x4 = 9
Have a look at the the Input section . It says that the first line denotes the number of test cases and the first line of every test case contains a single integer N
Thanx…I understood my mistake
what is wrong in my code
subtask 2 is giving WA