Mathematics, Competitive Programming, Philosophy, Discrete Mathematics.
strokes, what is the most number of repaintings that can occur? A repainting, as illustrated in the following figure is when a maximal contiguous segment of one colour changes to another colour. Figure 1: An example brush stroke illustrated. 1.1 Trivial bound There can be at most n segments after