摘要: 插头DP基础题的样子。。。输入N,M 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 using namespace std;11 12 #define... 阅读全文
posted @ 2014-05-04 17:14 nextbin 阅读(415) 评论(0) 推荐(0) 编辑
摘要: n个区域,每个区域有我方军队a[i],a[i]==0的区域表示敌方区域,输入邻接矩阵。问经过一次调兵,使得我方边界处(与敌军区域邻接的区域)士兵的最小值最大。输出该最大值。调兵从i->j仅当a[i]>0&&a[j]>0&&adj[i][j]==true;感觉有点像玩三国志什么的。。。赛后才知道是网络... 阅读全文
posted @ 2014-05-04 10:49 nextbin 阅读(375) 评论(0) 推荐(0) 编辑
摘要: 给你一个n*m的矩阵,每个点为'B'或'W'或'.'。然后你有一种碎片。碎片可以旋转,问可否用这种碎片精确覆盖矩阵。N,M30sec变成100ms,还是有点收获的。。。①如果某一个黑点匹配的那个match返回0而不是1,说明有黑点没匹配到,可直接break;结果为NO。。。。>30sec ==> 2... 阅读全文
posted @ 2014-05-04 09:06 nextbin 阅读(241) 评论(0) 推荐(0) 编辑