Comments

Can anyone tell me how to solve F after the contest? I came up with many approaches but none of them worked.

Anyway, F is a beautiful problem!

Is this TypeRacerForces?