题目//终于看懂题目了,,,,//一条线段里面不是每个坐标上都有要染色的点,所以为了满足条件,只能考虑那些给出坐标的点//所以就要排序一下了,不能直接根据坐标0 1 0 1……#include #include #include using namespace std ;struct tt{ ... Read More
posted @ 2014-09-02 21:17 laiba2004 Views(163) Comments(0) Diggs(0) Edit
题目参考网上的代码的、、、//要找到所有序列中的最长的公共子序列,//定义状态dp[i]为在第一个序列中前i个数字中的最长公共子序列的长度,//状态转移方程为dp[i]=max(dp[i],dp[j]+1); j#include #include using namespace std ;int a... Read More
posted @ 2014-09-02 17:07 laiba2004 Views(179) Comments(0) Diggs(0) Edit