Keeps it intact, and only the handle bar can all be sure to be there. So there is no risk of losing side. After binding to the tool belt and nails can...
分类:
其他好文 时间:
2014-08-25 13:06:44
阅读次数:
243
最长递减子序列,加记录有多少个最长递减子序列,然后需要去重。最麻烦的就是去重了。基本的思路就是:全面出现重复的值,然后还是相同长度的子序列,这里的DP记录的子序列是以当前值为结尾的时候,并且一定选择这个值的最长递减子序列, 那么就需要减去前面已经出现过了的子序列。有点绕口。举例就是9 8 9 8 2...
分类:
其他好文 时间:
2014-08-24 03:01:01
阅读次数:
258
最长递减子序列,加记录有多少个最长递减子序列,然后需要去重。
最麻烦的就是去重了。
基本的思路就是:全面出现重复的值,然后还是相同长度的子序列,这里的DP记录的子序列是以当前值为结尾的时候,并且一定选择这个值的最长递减子序列, 那么就需要减去前面已经出现过了的子序列。
有点绕口。
举例就是9 8 9 8 2 和 10 5 12 5 3;这些例子去重。
本类型的题目如果不用记录数据是可以使...
分类:
其他好文 时间:
2014-08-24 00:22:14
阅读次数:
187
从sina网站上获取,获取下来可以做分析使用,用于搭建自己的交易模型,选取符合自己交易系统的股票。 代码1: package com.xiaole.stock;import java.util.ArrayList;import java.util.List;import org.jsoup.Jso....
分类:
其他好文 时间:
2014-08-20 17:44:12
阅读次数:
535
题意:求最长上升子序列,n=100000思路:O(N^2)铁定超时啊。。。。利用贪心的思想去找答案。利用栈,每次输入数据检查栈,二分查找替换掉最小比他大的数据,这样得到的栈就是更优的。这个题目确实不错,思路很好#include #include #include #include #include ...
分类:
其他好文 时间:
2014-08-19 20:33:25
阅读次数:
267
Problem You receive a credit C at a local store and would like to buy two items. You first walk through the store and create a list L of all available items. From this list you would like to buy tw...
分类:
其他好文 时间:
2014-08-18 12:42:04
阅读次数:
222
Description
Benefit
Recently Yaghoub is playing a new trick to sell some more. When somebody gives him
A Tomans, he who never has appropriate changes, asks for
B Tomans su...
分类:
其他好文 时间:
2014-08-18 12:37:24
阅读次数:
234
这题LRJ书上翻译的有问题,书上说两点之间的cost是两点的欧几里得距离,而题目要求两点的距离是两点欧几里得距离的平方。
其余就没什么好说的了,裸的并查集,需要注意的就是二进制枚举子集的问题。
二进制枚举子集:
for(int i = 0 ; i < (1 << s) ; i++){ /*s是集合元素的个数*/
for(int j = 0 ; j < s ; j+...
分类:
其他好文 时间:
2014-08-17 20:01:52
阅读次数:
213
题目链接Your algorithms have become so good at predicting the market that you now know what the share price of Wooden Orange Toothpicks Inc. (WOT) will be...
分类:
其他好文 时间:
2014-08-17 08:07:01
阅读次数:
238
Evaluating Simple C ExpressionsThe task in this problem is to evaluate a sequence of simple C expressions, buy you need not know C to solve the proble...
分类:
其他好文 时间:
2014-08-15 12:44:48
阅读次数:
223