dp[dep][rest]表示长度为dep的F(x)<=rest的数的个数 1 #include<bits/stdc++.h> 2 using namespace std; 3 int dig[15],dp[15][5000]; 4 int dfs(int dep,int rest,int flag ...
分类:
其他好文 时间:
2016-05-19 15:08:17
阅读次数:
106
H.264码流打包分析
SODB 数据比特串-->最原始的编码数据
RBSP 原始字节序列载荷-->在SODB的后面填加了结尾比特(RBSP trailing bits 一个bit“1”)若干比特“0”,以便字节对齐。
EBSP 扩展字节序列载荷-- >在RBSP基础上填加了仿校验字节(0X03)它的原因是: 在NALU加到Annexb上时,需要填加每组NALU之前的开始码 StartC...
分类:
其他好文 时间:
2016-05-18 18:21:38
阅读次数:
189
338. Counting Bits --20160518 338. Counting Bits --20160518 Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calc ...
分类:
其他好文 时间:
2016-05-18 12:12:00
阅读次数:
143
Given an integer (signed 32 bits), write a function to check whether it is a power of 4.Example:
Given num = 16, return true. Given num = 5, return false.Follow up: Could you solve it without loops/re...
分类:
其他好文 时间:
2016-05-16 11:10:20
阅读次数:
140
leetcode:Reverse Bits 本题目收获 移位(<< >>), 或(|),与(&)计算的妙用 题目: Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represen ...
分类:
其他好文 时间:
2016-05-16 10:50:36
阅读次数:
289
leetcode:Number of 1 Bits 1.Number of 1 Bits 本题收获: 1.Hamming weight:即二进制中1的个数 2.n &= (n-1)【n = n & (n-1)】的用处 题目: Write a function that takes an unsign ...
分类:
其他好文 时间:
2016-05-15 17:59:56
阅读次数:
172
流 JAVA /IO 基本小结 通过一行常见的代码讨论:new BufferedReader(new InputStreamReader(System.in)) java的IO是基于流(stream)概念的,什么是流呢,作为初学者,我是这样理解的,在各个应用之间传送的是BITS,这些BIT可已被认为 ...
分类:
编程语言 时间:
2016-05-14 21:29:59
阅读次数:
220
人生不止眼前的狗血,还有远方的狗带 A题B题一如既往的丝帛题 A题题意:询问按照12345678910111213...的顺序排列下去第n(n<=10^3)个数是多少 题解:打表,输出 1 #include<bits/stdc++.h> 2 using namespace std; 3 int di ...
分类:
其他好文 时间:
2016-05-13 23:20:53
阅读次数:
378
题目: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32- ...
分类:
其他好文 时间:
2016-05-13 11:36:09
阅读次数:
144