码迷,mamicode.com
首页 >  
搜索关键字:consecutive numbers    ( 8082个结果
646. Maximum Length of Pair Chain
You are given n pairs of numbers. In every pair, the first number is always smaller than the second number. Now, we define a pair (c, d) can follow an ...
分类:其他好文   时间:2019-03-11 16:25:49    阅读次数:200
128. Longest Consecutive Sequence
Given an unsorted array of integers, find the length of the longest consecutive elements sequence. Your algorithm should run in O(n) complexity. Examp ...
分类:其他好文   时间:2019-03-11 13:06:41    阅读次数:155
HTTP记录
TCP握手协议 在TCP/IP协议中,TCP协议提供可靠的连接服务,采用三次握手建立一个连接. 【第一次握手】建立连接时,客户端发送syn包(syn=j)到服务器,并进入SYN_SEND状态,等待服务器确认; SYN:同步序列编号(Synchronize Sequence Numbers) 【第二次 ...
分类:Web程序   时间:2019-03-09 23:17:57    阅读次数:272
600. Non-negative Integers without Consecutive Ones
Given a positive integer n, find the number of non-negative integers less than or equal to n, whose binary representations do NOT contain consecutive ...
分类:其他好文   时间:2019-03-09 23:16:42    阅读次数:170
使用JSON.NET实现对象属性的自定义化格式
在使用JSON.NET序列化对象时,希望能够对一些属性字段的格式自定义处理,经常遇到的便是日期格式的自定义,下面就给出例子。 如有一个Person类,实例化Person对象时,希望BirthDate的格式结果为“yyyy/MM//dd”或“yyyy-MM-dd”:class Person { pub... ...
分类:Web程序   时间:2019-03-09 14:19:31    阅读次数:207
[PAT] 1073 Scientific Notation (20 分)Java
Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+- ...
分类:编程语言   时间:2019-03-08 20:56:58    阅读次数:167
[PAT] 1081 Rational Sum (20 分)Java
Given N rational numbers in the form numerator/denominator, you are supposed to calculate their sum. Input Specification: Each input file contains one ...
分类:编程语言   时间:2019-03-08 20:52:35    阅读次数:152
[985] 令牌放置
import java.util.List; /* * @lc app=leetcode.cn id=985 lang=java * * [985] 令牌放置 * * https://leetcode-cn.com/problems/sum-of-even-numbers-after-queries... ...
分类:其他好文   时间:2019-03-08 09:24:49    阅读次数:193
UVa 10055
说一下犯错的地方: 1)没有注意数据范围,题目中是The input numbers are not greater than balabalabala. 而这个32位的int类型恰好装不下2^32,所以,你懂的 2)scanf那个地方,没有用%ld,用的是%d;printf那个地方也是 语言(提交 ...
分类:其他好文   时间:2019-03-06 01:10:00    阅读次数:168
程序控制结构--选择结构
选择结构 单分支选择结构 语法 if 表达式: 语句块 当表达式值为True时,表达式满足,语句块执行,否则不执行 >>> x = input('Input two numbers:')Input two numbers:23 44>>> a,b = map(int,x.split())>>> if ...
分类:其他好文   时间:2019-03-05 23:08:17    阅读次数:266
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!