Recently i participated in ‘Programmers Army Monthly Contest - Bit Manipulation’ contest (https://www.codechef.com/BITM2021?itm_campaign=contest_listing). I was solving ’ Help Bob!’ problem (https://www.codechef.com/problems/HBOB02) and i faced weird issue. I was confident during the contest that my solution is correct. However, it kept failing due to wrong answer.
Later after the contest when i tried to debug my code i found out it is getting accepted if i am using ‘vector’ and failing while using ‘array’, rest everything is exactly same. Can someone please help me why is this so ? Am i doing something wrong here ?
Submission link using ‘array’ - https://www.codechef.com/viewsolution/42147645
Submission link using ‘vector’ - https://www.codechef.com/viewsolution/42147651