欢迎访问我的个人网站==》 jiashubing.cn
摘要: 题目链接:http://poj.org/problem?id=3311题目大意:一个送披萨的,每次送外卖不超过10个地方,给你这些地方之间的时间,求送完外卖回到店里的总时间最小。Sample Input30 1 10 101 0 1 210 1 0 1010 2 10 00Sample Output8分析:dp[i][j]:表示在i状态(用二进制表示城市有没有经过)时最后到达j城市的最小时间,转移方程:dp[i][j]=min(dp[i][k]+d[k][j],dp[i][j]) d[k][j]是k城市到j城市的最短距离,显然要先用flody处理一下。代码如下: 1 # include 2 # 阅读全文
posted @ 2013-08-29 21:58 贾树丙 阅读(378) 评论(0) 推荐(0) 编辑
摘要: Mondriaan's DreamProblem DescriptionSquares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his 'toilet series' (where he had to use his toilet paper to draw on, for all of his paper was filled with squares and rectangles), he 阅读全文
posted @ 2013-08-29 19:07 贾树丙 阅读(626) 评论(0) 推荐(0) 编辑
摘要: 使用Pascal的OIers简要介绍一下C/C++样式的位运算(bitwise operation)。其优先级:not>and>xor>or 使用Pascal的OIers简要介绍一下C/C++样式的位运算(bitwise operation)。其优先级:not>and>xor>or 名称 C/C++ 阅读全文
posted @ 2013-08-29 18:11 贾树丙 阅读(273) 评论(0) 推荐(0) 编辑