其实还是从一个x点出发到所有点的最短路问题。来和回只需分别处理一下逆图和原图,两次SPFA就行了。#include#include#include#include#include#include#include#include#include#include#include#include#incl...
分类:
其他好文 时间:
2014-11-18 23:58:43
阅读次数:
450
/*树形dp:给一颗树,要求一组节点,节点之间没有父子关系,并且使得所有的节点的权值和最大对于每一个节点,我们有两种状态dp[i][0]表示不选择节点i,以节点i为根的子树所能形成的节点集所能获得的最大权值和 dp[i][1]表示选择节点i ,同上!转移方程:dp[i][0]+=max(dp[i_s...
分类:
其他好文 时间:
2014-11-17 21:07:58
阅读次数:
146
感谢以下参考资料: 关于如何使用第三方的库: http://stackoverflow.com/questions/21942545/how-to-install-third-party-libraries http://www.learncpp.com/cpp-tutorial/a3...
分类:
编程语言 时间:
2014-11-16 01:49:32
阅读次数:
541
并查集是我暑假从高手那里学到的一招,觉得真是太精妙的设计了。以前我无法解决的一类问题竟然可以用如此简单高效的方法搞定。不分享出来真是对不起party了。(party:我靠,关我嘛事啊?我跟你很熟么?)来看一个实例,杭电1232畅通工程 首先在地图上给你若干个城镇,这些城镇都可以看作点,然后告诉你哪些...
分类:
其他好文 时间:
2014-11-15 14:09:20
阅读次数:
231
首先贴下环境:Win7 64, NDK r8e, libiconv-1.14, cygwin
一 Win32环境配置
Cocos2D-X自带有win32上的iconv库,只需要配置一下即可使用。
1 引入头文件
属性->配置属性->C/C++->附加包含目录:
$(ProjectDir)..\..\..\..\cocos2dx\platform\third_party\win32...
分类:
移动开发 时间:
2014-11-11 21:12:07
阅读次数:
221
Problem DescriptionIn the new year party, everybody will get a "special present".Now it's your turn to get your special present, a lot of presents now...
分类:
其他好文 时间:
2014-11-11 20:55:21
阅读次数:
144
Problem Description
Benjamin is going to host a party for his big promotion coming up.
Every party needs candies, chocolates and beer, and of course Benjamin has prepared some of those. But as...
分类:
其他好文 时间:
2014-11-09 16:40:34
阅读次数:
168
Descriptionn participants of ?crazy tea party? sit around the table. Each minute one pair of neighbors can change their places. Find the minimum time ...
分类:
其他好文 时间:
2014-11-09 00:56:48
阅读次数:
241
Silver Cow Party
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 13103
Accepted: 5883
题目链接:http://poj.org/problem?id=3268
Description
One cow from each of...
分类:
其他好文 时间:
2014-11-08 19:43:11
阅读次数:
252