Little Vasya has received a young builder’s kit. The kit consists of several wooden bars, the lengths of all of them are known. The bars can be put one on the top of the other if their lengths are the...
分类:
其他好文 时间:
2014-07-22 23:01:53
阅读次数:
323
题目描述Halloween is coming! So xiaoY has to prepare M
candies to treat the neighbor kids.When this horrible night come, There are N
little children ask x...
分类:
其他好文 时间:
2014-05-19 22:40:32
阅读次数:
412
在与Android交互过程中,因为Android是从低位往高位读,iOS是从高位往低位读,所以交互数据需要进行转换。
/*
* convert big endian to little endian in C
*/
uint16_t swap_uint16( uint16_t val );
int16_t swap_int16( int16_t val );
uint32_t s...
分类:
移动开发 时间:
2014-05-14 21:38:51
阅读次数:
407
解题思路:经过打表可得规律答案要么是0
要么是2的N次要得到最大的XOR值,其值一定是2的N次即在 l 和 r 的二进制中,从左到右遍历过去,如果碰到 l 为 1 r 为 0则可说明在『l ,
r】中存在 1000000000 和 0111111111 可得到最大XOR值为2的N次PS:不会存在首先...
分类:
其他好文 时间:
2014-05-12 20:05:45
阅读次数:
324
一、冒泡排序冒泡排序算是最基础的一种算法了,复杂度为O(N^2),其基本思想是:从最低端数据开始,两两相邻比较,如果反序则交换。代码如下:/*最基本的冒泡排序*/void
BubbleSort1 (int n, int *array) /*little > big*/{ int i, j...
分类:
其他好文 时间:
2014-05-09 13:02:57
阅读次数:
319
The Little Elephant from the Zoo of Lviv currently is on the military mission. There are N enemy buildings placed in a row and numbered from left to right strating from 0. Each building i (except the ...
分类:
其他好文 时间:
2014-05-07 11:49:37
阅读次数:
390
The Little Elephant likes permutations. This time he has a permutation A[1], A[2], ..., A[N] of numbers 1, 2, ...,N.
He calls a permutation A good, if the number of its inversions is equal to the n...
分类:
其他好文 时间:
2014-05-07 07:20:50
阅读次数:
356
Little Wish~ lyrical step~
Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 417 Accepted Submission(s): 109
Problem Description
N chi...
分类:
其他好文 时间:
2014-05-02 04:37:42
阅读次数:
393
OJ题目:click here~~
题目分析:f个束花,编号为1…… f。v个花瓶,编号为1 …… v。编号小的花束,所选花瓶的编号也必须比编号大的花束所选花瓶的编号小,即花i 选k, 花j选t ,如果i j , 则定有 k > t 。 每束花放在每个花瓶里有一个值。求f束花,能得到的最大值。
设dp[ i ][ j ] 为第 i 束花选择了第 j 个花瓶 , 则转移方程为
dp[ i ]...
分类:
其他好文 时间:
2014-04-29 13:36:20
阅读次数:
278
RTMP直播,音频编码采用AAC时,需要把帧头的数据去掉。
第一个数据包,发送4个字节,前面两个是0xAF、0x00,我看有文章写的是这个0xAF的A代表的是AAC,说明如下:
0 = Linear PCM, platform endian
1 = ADPCM
2 = MP3
3 = Linear PCM, little endian
4 = Nellymoser 16 kHz mon...
分类:
其他好文 时间:
2014-04-29 13:13:21
阅读次数:
425