Mathematics, Competitive Programming, Philosophy, Discrete Mathematics.
stroke is at most 3. Let the strokes be denoted by o_1, … o_m and the states be denoted by s_0, s_1, … s_m. The stroke o_i changes the state from s_{i-1} to s_i. Note that what we have shown in section 1.5 is equivalent to the statement a(o_m)-Φ(s_m)≤0. a(o_1)+…+a(o_m)=c(o_1)+…+c(o_m)+Φ(s_m)-Φ(s_0)