摘要: 题目链接本质上是DP,但是俩变量就搞定了。 1 #include 2 #include 3 #include 4 using namespace std; 5 int p[500001]; 6 bool cmp(int a,int b) 7 { 8 if(a 0)30 p1 = p2 + 1;31 else32 p2 = p1 + 1;33 }34 printf("%d\n",max(p1,p2));35 }36 } 阅读全文
posted @ 2013-10-29 20:19 Naix_x 阅读(134) 评论(0) 推荐(0) 编辑