- 博客(6)
- 资源 (1)
- 收藏
- 关注
转载 HDOJ 1150 Machine Schedule
用二分图的最大匹配来求解题目,关于其思想详见:http://blog.csdn.net/xinhanggebuguake/article/details/6668071//#include #include using namespace std; const int MAX = 102; bool linkMap[MAX][MAX]; int cros
2011-10-20 22:06:07
272
转载 使用stringstream对象简化类型转换
使用stringstream对象简化类型转换C++标准库中的提供了比ANSI C的更高级的一些功能,即单纯性、类型安全和可扩展性。在本文中,我将展示怎样使用这些库来实现安全和自动的类型转换。为什么要学习如果你已习惯了风格的转换,也许你首先会问:为什么要花额外的精力来学
2011-09-21 15:58:32
209
转载 STL之vector使用
第一部分使用入门vector可用于代替C中的数组,或者MFC中的CArray,从许多说明文档或者网上评论,一般一致认为应该多用vector,因为它的效率更高,而且具备很好的异常安全性。而且vector是STL推荐使用的默认容器,除非你知道你有特殊需要,使用vector不能
2011-09-19 21:40:47
274
转载 vector函数
构造函数语法:vector(); vector( size_type num, const TYPE &val ); vector( const vector &from ); vector( input_iterator start,
2011-09-19 20:52:12
840
原创 TYVJ 1078 删数
有N个不同的正整数数x1, x2, ... xN 排成一排,我们可以从左边或右边去掉连续的i个数(只能从两边删除数),1每次操作都有一个操作价值,比如现在要删除从i位置到k位置上的所有的数。操作价值为|xi – xk|*(k-i+1),如果只去掉一个数,操作价值为这个数的值。任务如何操作可以得到最大值,求操作的最大价值。
2010-12-22 09:56:00
435
原创 UVa 10131 Is Bigger Smarter?
Some people think that the bigger an elephant is, the smarter it is. To disprove this, you want to take the data on a collection of elephants and put as large a subset of this data as possible into a sequence so that the weights are increasing, but the IQ'
2010-12-21 15:39:00
924
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人