Editorial for Stardust Snow
Submitting an official solution before solving the problem yourself is a bannable offence.
We can turn this problem into a 4D dynamic programming question where we keep track of horizontal position, time, snowflakes left, and temperature left. At each position, consider two cases, one where Griffy takes the snowflake (if a snowflake exists at that position and time), and the other where Griffy does not take the snowflake. TIME STARTS AT 0.
Skills needed: Dynamic programming
Time complexity: about ~\mathcal O(RCKBM)~