All testcases are failing

Refer for code:-

hello @ambuj_0909
your code is correct, just print output for each test cases in separate line .

ie add cout<<"\n"; after printng all distances

Thanks @aman212yadav