
个人看法
软件丶Crazyxu
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #500 Chemical table (一道很有意思的dfs题)
题目链接:http://codeforces.com/problemset/problem/1012/B这是一道dfs题,但是感觉自己实在感觉不出来dfs‘的感觉,在看了一下了别人的代码后,突然就明白了。思路写一下吧:我们可以把行和列是一个n+m个点的图,然后(r,c)相当对于r点与n+c这个点有一条边,然后我们我们只要求他的连通块出来,若没有连在一起就造一条连接的边,然后...原创 2018-07-31 13:43:16 · 278 阅读 · 0 评论 -
Codeforces Round #500 Hills(一道dp题)
题目链接:http://codeforces.com/problemset/problem/1012/C这道题的思路是在前i个商品中,选出j个,然后对第i个进行区分选还是不选。dp方程为:dp[i][j][0] = min(dp[i-1][j][0],dp[i-1][j][1]);dp[i][j][1] = min(dp[i-2][j-1][0]+dis1(前面的数)+dis2(后面的)...原创 2018-07-31 15:31:18 · 286 阅读 · 0 评论 -
poj 3267(dp水题)
DescriptionFew know that the cows have their own dictionary with W (1 ≤ W ≤ 600) words, each containing no more 25 of the characters 'a'..'z'. Their cowmunication system, based on mooing, is not ver...原创 2018-07-28 09:44:56 · 292 阅读 · 0 评论