Green Boy Can't You Solve It Out?
2 problems for div3 participants
Bomb Defusing II
Find how many years in range [l,r] that it has Sept.1 as a weekend(Sunday and Saturday)?
2018/9/1 is Saturday while 2019/9/1 is Sunday
You are flying on a 2D plane. Your position is (1,x) where x is given. There are N bouncy platforms. The i-th one is located at (i,h_i) and has bouncy attribute b_i
You can do the following moves when you are at some point (x,y):
- parachut to (z,y-1) if |z-x|\leq1
- jump to (x,h_i+b_i) if you are on some bouncy platform. ie.you can jump if you have y=h_x
die if you are below some bouncy platform. ie.you will die if y\lt h_x
What's the maximum height you can achieve when you reached x=N+1? Print -1 if you can't reach there.
Start at (1,2) then fly to (2,1) then fly to (1,0) then jump to (1,10) then fly to (2,9) (3,8) (4,7).You can also fly to (2,1) then fly to (3,0) then fly to (4,-1) which is not better.
Div2B→All data doesn't exceed 1000.
(Div2B-Div2C)→All data doesn't exceed 1,000,000
Enjoy the problems, green boys 🙂
来源：Hell Hole Studios Blog