这道题目比上一个稍微复杂点,答题思路是要分析价格的走势,找出每一阶段的波谷和波峰,求出每一阶段的利润,然后累加得出总利润。需要预读下一个数字,判断价格的走向,如果之前在下降,现在上升了,则得到了波谷,如果之前上升,现在下降了,则得到了波峰,每次得到波峰就要累加一次利润,特别指出的是,有可能直到末尾之...
分类:
其他好文 时间:
2014-11-08 22:04:10
阅读次数:
208
这道题目号称是中等难度,但是我做的时候却觉得非常简单,好像应该算是easy的级别。只是用了一个变量,时间复杂度是线性,从性能来说已经很不错了,时间在400ms左右,后来看了一眼讨论版,发现得票最多的家伙用了和我一样的方法,只不过那个家伙多定义了一个变量而已,不过定义之后也没用,可能他也忘记删除了。p...
分类:
其他好文 时间:
2014-11-08 20:51:02
阅读次数:
205
1 #include 2 #include 3 const int N = 10000; 4 int rank[N],wb[N],count[27],bucket[N],height[N]; 5 6 void build_sa(int *r, int *sa, int n, int m) 7...
分类:
编程语言 时间:
2014-11-08 14:48:55
阅读次数:
220
如:ROW_NUMBER、RANK、DENSE_RANK三个分析函数都是按照col1分组内从1开始排序 ROW_NUMBER() 是没有重复值的排序(即使两天记录相等也是不重复的),可以利用它来实现分页 DENSE_RANK() 是连续排序,两个第二名仍然跟着第三名RANK() ...
分类:
数据库 时间:
2014-11-08 11:51:41
阅读次数:
262
Description
Transmitting and memorizing information is a task that requires different coding systems for the best use of the available space. A well known system is that one where a number is ass...
分类:
其他好文 时间:
2014-11-08 09:19:39
阅读次数:
188
http://poj.org/problem?id=3617Best Cow LineTime Limit:1000MSMemory Limit:65536KTotal Submissions:10603Accepted:3187DescriptionFJ is about to take hisN...
分类:
其他好文 时间:
2014-11-07 18:32:40
阅读次数:
234
查找特定字符串并颜色显示
[root@fwq test]# grep -n 'the' regular_express.txt --color=auto
8:I can't finish the test.
12:the symbol '*' is represented as start.
15:You are the best is mean you are the no. 1.
16:The world is the same with "glad".
18:google is the...
分类:
系统相关 时间:
2014-11-07 17:08:59
阅读次数:
251
MAP(Mean Average Precision):单个主题的平均准确率是每篇相关文档检索出后的准确率的平均值。主集合的平均准确率(MAP)是每个主题的平均准确率的平均值。
MAP 是反映系统在全部相关文档上性能的单值指标。系统检索出来的相关文档越靠前(rank 越高),MAP就可能越高。如果系统没有返回相关文档,则准确率默认为0。
例如:假设有两个主题,主题1有4个相关网页,主题2有5...
分类:
其他好文 时间:
2014-11-06 17:42:43
阅读次数:
1087
摘录Android 官方博客:
Which client is best?
Apache HTTP client has fewer bugs on Eclair and Froyo. It is the best choice for these releases.
For Gingerbread and better, HttpURLConnection is the...
分类:
Web程序 时间:
2014-11-06 11:00:37
阅读次数:
198
Choose the best routeTime Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeHDU 2680DescriptionOne day , Kiki wants to ...
分类:
其他好文 时间:
2014-11-04 19:03:57
阅读次数:
95