many females near womens free run 5 shoes to the entire world would favor heeled Nike shoes. But why would they consider into account it? The solutio....
分类:
其他好文 时间:
2014-07-07 09:34:31
阅读次数:
208
Implementint sqrt(int x).Compute and return the square root ofx.public class Solution { public int sqrt(int x) { if(x < 0) return -1; if(x =...
分类:
其他好文 时间:
2014-07-06 17:37:30
阅读次数:
150
一,列表的分类1,无序列表通常使用项目符号作为列表项的前缀。符号有三种属性1,默认值为实体圆心 type="disc" 2,实体方心 type="square" 3,空心圆type="circle"语法声明这是个无序列表 并设置列表符号的样式 作为列表语句的开始2,有序列表每个列表项目前,有顺序的符...
分类:
Web程序 时间:
2014-07-06 14:31:31
阅读次数:
165
UVA 11246 - K-Multiple Free set
题目链接
题意:一个{1..n}的集合,求一个子集合,使得元素个数最多,并且不存在有两个元素x1 * k = x2,求出最多的元素个数是多少
思路:推理一下,
一开始n个
先要删除k倍的,删除为{k, 2k, 3k, 4k, 5k, 6k...},会删掉多余的k^2,因此在加回k^2倍的数
然后现在集合中会出现...
分类:
其他好文 时间:
2014-07-05 10:54:51
阅读次数:
206
UVA 1426 - Discrete Square Roots
题目链接
题意:给定X, N, R,要求r2≡x (mod n)
(1
思路:
r2≡x (mod n)=>r2+k1n=x
已知一个r!,带入两式相减得
r2?r12=kn
=> (r+r1)(r?r1)=kn
枚举A,B,使得
A * B = n
(r + r1)为A倍数
(r - r1...
分类:
其他好文 时间:
2014-07-04 07:58:36
阅读次数:
273
??
垃圾回收用来实现内存的自动管理(automatic management),区别于人工管理(manual management)。人工管理内存容易出现的问题:
1)悬垂指针,dangling pointer
2)重复回收,Double free
3)内存泄露,memory leak
历史
垃圾回收的概念及技术由John McCarthy于1959年发明,应用于List...
分类:
其他好文 时间:
2014-07-03 16:34:03
阅读次数:
194
爱钻牛角尖的毛病又来了。仅仅是因为以前的一个c语言free内存报错。 我们知道,malloc分配的内存是从堆里获得的,而堆是由操作系统维护的,也就是说,在没有malloc前,内存空间是不属于该进程空间的,malloc函数务必调用了操作系统的系统函数(参考前边linux内存管理heap篇可知,是br....
分类:
其他好文 时间:
2014-07-02 18:21:10
阅读次数:
217
1、top
查看系统负载情况,load average
CPU使用情况,按1查看每个CPU的使用情况
shift+h 查看每个线程的情况
2、free -m
按兆为单位输出内存的已用,未用,总共等结果
total used free shared buffers cached
Mem:...
分类:
其他好文 时间:
2014-07-02 16:34:55
阅读次数:
287
Square CoinsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7883Accepted Submission(s): 5332Proble...
分类:
其他好文 时间:
2014-07-02 14:49:04
阅读次数:
196
step1.
下载Acronis Disk Director Suite工具,随便一搜都能下载的到。
step2.
这个软件使用很简单,网上有很多图文教程。扩充盘使用Increase the free space 功能
1 主界面单击Increase the free space -》选中要扩充的磁盘(这里扩充的是c盘)—》NEXT
2 选中被用来补充C盘的容量的磁盘...