my code:#include #include #includeusing namespace std;int find(int num,int A []){while(num!=A[num])//{ num = A[num];return num;}//bool follow(int a...
分类:
其他好文 时间:
2014-07-24 12:16:25
阅读次数:
175
Given n, how many structurally unique BST's (binary search trees) that store values 1...n?
For example,
Given n = 3, there are a total of 5 unique BST's.
1 3 3 2 1
\...
分类:
编程语言 时间:
2014-07-24 11:35:42
阅读次数:
245
一. redis
Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes
http...
分类:
其他好文 时间:
2014-07-24 10:32:58
阅读次数:
223
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy on...
分类:
编程语言 时间:
2014-07-24 10:25:36
阅读次数:
227
刚到这个公司,开始进行cocos2d-x的真正项目开发,为了以后能够更好扩展,改动不大,决定使用3.X版本开发,而且使用ui编辑器。在导入的时候,今天遇到一个问题,Buffer is too small,搜了不少,但是都没有解决的方案,最后查到一个错误诱因,是因为ui中使用了label所致,于是我试...
分类:
Web程序 时间:
2014-07-23 16:13:21
阅读次数:
264
SquareInput:Standard InputOutput:Standard OutputGivennintegers you can generate2n-1non-empty subsets from them. Determine for how many of these subset...
分类:
其他好文 时间:
2014-07-23 15:17:56
阅读次数:
292
在项目中用到了一对多的实体类关系映射,之前接触的都是基于配置文件的映射实现,但是公司的大部分都是基于注解的,因此自己参考之前的代码捣鼓了基于注解的一对多的映射关系实现。
背景:
一的一端:QingAoCenterInfo:青奥场所信息,
多的一端:QingAoPlaceInfo:青奥场馆信息,
其中一个青奥场所下可以包含多个青奥场馆
one端:QingAoCenterIn...
分类:
系统相关 时间:
2014-07-23 13:10:46
阅读次数:
246
E. Invitation CardsTime Limit: 8000msMemory Limit: 262144KB64-bit integer IO format:%lld Java class name:MainIn the age of television, not many people...
分类:
其他好文 时间:
2014-07-22 22:37:14
阅读次数:
278
Invitation CardsDescriptionIn the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this f...
分类:
其他好文 时间:
2014-07-22 22:35:15
阅读次数:
238
我已经两次因为不恰当的省略go中的函数返回值,一次造成MySql的too many connection错误,一次造成严重的内存泄漏。所以在这里大家分享一下这个问题和解决办法,也提醒自己以后不要再犯类似的错了。 众所周知,g...
分类:
其他好文 时间:
2014-07-22 22:33:12
阅读次数:
227