uva1424】的更多相关文章

题目大意 给定一个包含n(n<=100)个点的无向连通图和一个长度为L的序列A(L<=200),你的任务是修改尽量少的数,使得序列中的任意两个相邻的数或者相同,或者对应图中两个相邻结点 题解 妈蛋,这么水的题目想不出来,然后搜了下解题报告,瞬间觉得巨水啊....智商拙计啊 用dp[i][j]表示前i个数并且以数字j结尾的序列需要修改的最少次数,那么如果j等于a[i]那么dp[i][j]=min(dp[i-1][k]),否则的话dp[i][j]=min(dp[i-1][k]+1)(j==k或者j…
Traveling salesmen of nhn. (the prestigious Korean internet company) report their current location to the company on a regular basis. They also have to report their new location to the company if they are moving to another location. The company keep…