【BZOJ1609】[Usaco2008 Feb]Eating Together麻烦的聚餐【最长不下降子序列】
【题目链接】正反做一次最长不下降子序列,显然答案是n减去最长不下降子序列的长度。/*FootprintsInTheBloodSoakedSnow*/#include#includeusingnamespacestd;constintmaxn=30005,inf=0x3f3f3f3f;intn,num[maxn],dp[maxn],g[maxn];inlineintiread(){intf=1,x=