Given an unsorted integer array, find the first missing positive integer.
For example,
Given [1,2,0] return 3,
and [3,4,-1,1] return 2.
Your algorithm should run in O(n) time and uses constant...
分类:
其他好文 时间:
2015-01-18 15:47:14
阅读次数:
126
一个人的旅行
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 20631 Accepted Submission(s): 7210
Problem Description
虽然草儿是个路痴(就是在杭电待了...
分类:
编程语言 时间:
2015-01-18 15:47:13
阅读次数:
201
点击打开链接
1017. Staircases
Time limit: 1.0 second
Memory limit: 64 MB
One curious child has a set of N little bricks (5 ≤ N ≤ 500). From these bricks he builds different staircases. S...
分类:
其他好文 时间:
2015-01-18 14:27:09
阅读次数:
156
Drainage Ditches
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 58538
Accepted: 22485
Description
Every time it rains on Farmer John's fields, a pond fo...
分类:
编程语言 时间:
2015-01-18 13:12:01
阅读次数:
291
简单n!Time Limit: 1000ms Memory limit: 65536K有疑问?点这里^_^题目描述给定一个数n(0 #include #include #include #include #include #include #include using namespace std;/...
分类:
编程语言 时间:
2015-01-18 13:07:28
阅读次数:
355
双向链表Time Limit: 1000ms Memory limit: 65536K有疑问?点这里^_^题目描述学会了单向链表,我们又多了一种解决问题的能力,单链表利用一个指针就能在内存中找到下一个位置,这是一个不会轻易断裂的链。但单链表有一个弱点——不能回指。比如在链表中有两个节点A,B,他们的...
分类:
其他好文 时间:
2015-01-18 13:07:18
阅读次数:
210
图练习-BFS-从起点到目标点的最短步数Time Limit: 1000ms Memory limit: 65536K有疑问?点这里^_^题目描述在古老的魔兽传说中,有两个军团,一个叫天灾,一个叫近卫。在他们所在的地域,有n个隘口,编号为1..n,某些隘口之间是有通道连接的。其中近卫军团在1号隘口,...
分类:
编程语言 时间:
2015-01-18 13:07:00
阅读次数:
264
亲和数Time Limit: 1000ms Memory limit: 65536K有疑问?点这里^_^题目描述如果a的因子和等于b,b的因子和等于a,且a≠b,则称a,b为亲和数对。 比如220的所有真约数(即不是自身的约数)之和为: 1+2+4+5+10+11+20+22+44+55+110=2...
分类:
其他好文 时间:
2015-01-18 13:03:17
阅读次数:
254
首先安装NTP:1 yum install -y ntpdate然后执行NTP命令:1 ntpdate time.windows.com或者:1 ntpdate cn.pool.ntp.org想要偷懒,让机器自动校准时间的话,只需要将命令加入到cron就可以了。1 crontab -e2 * */1...
分类:
系统相关 时间:
2015-01-18 12:59:06
阅读次数:
330
Godfather
Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u
Submit Status
Description
Last years Chicago was full of gangster fights and strange murders. T...
分类:
其他好文 时间:
2015-01-18 11:54:24
阅读次数:
178