What's the logic behind this problem?

How to solve this problem??
https://www.codechef.com/ZCOPRAC/problems/ZCO14004

first try to solve this https://www.codechef.com/ZCOPRAC/problems/ZCO14002/ problem .
Both the problems are approximately same .
you have to find such combination of elements in the array so that you dont miss out any three consecutive element .
In other words , for every consecutive window of size 3 of the array , you must include at least one element .

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

Yes sir my doubt was cleared. I have given feedback now. Please see that I have posted 2 more doubts.
Thank you :relaxed: