Mathematics, Competitive Programming, Philosophy, Discrete Mathematics.
c(o_1)+…+c(o_m)=a(o_1)+…+a(o_{m-1})+a(o_m)+Φ(s_0)-Φ(s_m) c(o_1)+…+c(o_m)≤3*(m-1)+a(o_m)+1-Φ(s_m) c(o_1)+…+c(o_m)≤3*m-2+a(o_m)-Φ(s_m) c(o_1)+…+c(o_m)≤3*m-2 This again proves the perfect bound on the number of repaintings. QED. 1.7 Did we (as B) win the war? Note how much better the perfect bound is