P3517 [POI 2011] WYK-Plot
Description
We call any sequence of points in the plane a plot.
We intend to replace a given plot $(P_1,\cdots,P_n)$ with another that will have at most $m$ points ($m\le n$) in such a way that it "resembles" the original plot best.
The new plot is created as follows. The sequence of points $P_1,\cdots,P_n$ can be partitioned into $s$ ($s\le m$) contiguous subsequences:
$(P_{k_0+1},\cdots,P_{k_1}),(P_{k_1+1},\cdots,P_{k_2}),\cdots,(P_{k_{s-1}+1},\cdots,P_{k_s})$ where $0=k_0
Input Format
N/A
Output Format
N/A