摘要:
题意 略 分析 因为字典序最小,所以从后面的列递推,每次对上一列的三个方向的行排序就能确保,数字之和最小DP就完事了 代码 因为有个地方数组名next和里面本身的某个东西冲突了,所以编译错了,后来改成nt就过了 include include include using namespace std; 阅读全文
摘要:
链接 [http://www.51nod.com/onlineJudge/questionCode.html problemId=1133¬iceId=468024] 题意 X轴上有N条线段,每条线段有1个起点S和终点E。最多能够选出多少条互不重叠的线段。(注:起点或终点重叠,不算重叠)。 例 阅读全文