码迷,mamicode.com
首页 >  
搜索关键字:number    ( 26994个结果
Leetcode dp Edit Distance
Edit Distance  Total Accepted: 14997 Total Submissions: 59129My Submissions Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each oper...
分类:其他好文   时间:2014-09-16 19:01:41    阅读次数:152
hdu 5014 Number Sequence (贪心)
Number Sequence Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 697    Accepted Submission(s): 332 Special Judge Problem Description ...
分类:其他好文   时间:2014-09-16 18:58:03    阅读次数:203
[leetcode] Minimum Depth of Binary Tree ,到叶子节点的最小距离 (python)
Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest le...
分类:编程语言   时间:2014-09-16 18:48:00    阅读次数:242
uva 10909 - Lucky Number(树状数组)
题目链接:uva 10909 - Lucky Number 题目大意:定义Lucky Number, 给定一个数n,输出有两个差值最小Lucky Number,x和y,要求x+y=n。 解题思路:根据Lucky Number定义,用树状数组预处理出所有的Lucky Number,然后对于每个n,用二分找到最接近n/2的Lucky Number,然后去枚举。 #include #in...
分类:其他好文   时间:2014-09-16 17:26:10    阅读次数:214
hdu 5014(贪心+异或 西安网络赛)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5014 Number Sequence Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 681    Accepted Submis...
分类:其他好文   时间:2014-09-16 16:04:00    阅读次数:220
TCP/IP的三次握手和四次挥手
TCP协议的三次握手过程1.建立连接时,客户端向服务器发送SYN包,并产生一个顺序号码seq number=k,等待服务器确认。2.服务器受到请求后,确认联机信息后,向客户端发送确认码ack=k+1,SYN包,并产生一个顺序号码seq number=q。3.客户端受到确认信息后,检查确认码ack是否...
分类:其他好文   时间:2014-09-16 15:47:20    阅读次数:157
Codeforces Round #266 (Div. 2) C. Number of Ways
You've got array a[1],?a[2],?...,?a[n], consisting of n integers. Count the number of ways to split all the elements of the array into three contiguous parts so that the sum of elements in each part ...
分类:其他好文   时间:2014-09-16 12:45:20    阅读次数:164
Letter Combinations of a Phone Number [leetcode]谈谈循环解法的两种思路
本系列博文中有很多两种思路的,其实是因为第一遍刷题的时候有一个想法,第二遍刷题的时候已经忘掉之前的思路了,又有新的想法了。 同时大部分代码我也同时PO到leetcode的对应题目的问答中去了,所以如果你也查看问题讨论的话会发现有和我一模一样的代码,其实就是我PO的:) 书接正文,基于循环的两种思路如下: 第一种思路 比如“234”这个字符串,我可以先将0...1的所有排列找到-->...
分类:其他好文   时间:2014-09-16 12:42:30    阅读次数:145
ORACLE常用脚本示例
create table DBO.INDEX_POLICY_TBL( ID NUMBER(10) NOT NULL PRIMARY KEY, POLICY_ID NUMBER(10,0) default (-1) NOT NULL, ALARM_COUNT NUMBER(10) default...
分类:数据库   时间:2014-09-16 12:21:20    阅读次数:284
hdu 5014 Number Sequence(西安网络赛1008)
Number Sequence                                                                  Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)                                ...
分类:其他好文   时间:2014-09-16 10:51:50    阅读次数:189
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!