Problem Description
Loading...
Problem Analysis
On day 0, it crawls for 8 hours during the day
after that, 12 hours during the day and 12 hours at night
So…
Exclude the special cases
then just simulate it
Also, the problem statement says
that the caterpillar can go underground (negative values are allowed)
cpp
| |
Problem link:【CodeForces】[652A]Gabriel and Caterpillar