码迷,mamicode.com
首页 >  
搜索关键字:hdu 4825 xor sum    ( 52437个结果
[leetcode]Two Sum @ Python
原题地址:http://oj.leetcode.com/problems/two-sum/题意:找出数组numbers中的两个数,它们的和为给定的一个数target,并返回这两个数的索引,注意这里的索引不是数组下标,而是数组下标加1。比如numbers={2,7,11,17}; target=9。那...
分类:编程语言   时间:2014-04-30 21:45:43    阅读次数:528
hdu 2050 折线分割平面 (递推)
折线分割平面Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15709Accepted Submission(s): 10836Problem De...
分类:其他好文   时间:2014-04-30 21:37:40    阅读次数:516
UVA 10891 Game of Sum(DP)
This is a two player game. Initially there areninteger numbers in an array and playersAandBget chance to take them alternatively. Each player can take...
分类:其他好文   时间:2014-04-30 20:34:38    阅读次数:519
CSAPP 读书笔记 - 2.31练习题
根据等式(2-14)假如w = 4 数值范围在-8 ~ 7之间 2^w = 16x = 5, y = 4的情况下面x + y = 9 >=2 ^(w-1) 属于第一种情况sum = x + y = 9- 2^w = –7sum – x == y?-7 – 4 = – 11 属于第三种情况 负溢出su...
分类:移动开发   时间:2014-04-30 17:08:03    阅读次数:443
hdu 1492
好高兴 一上午做了2个题 题意:求素因子只有2 3 5 7 数 约束的个数 我用的时搜索计数法 感觉还应该有比较不错的组合数学方法#includeusing namespace std;__int64 dmax;int prime[4];void dfs(int t){ if(t>=4) { ...
分类:其他好文   时间:2014-04-29 11:21:47    阅读次数:278
HDU-1081-To The Max
求最大连续子矩阵和问题可以转化为求最大连续子序列问题map[i][j]=map[0][j]+map[1][j]+...+map[i][j]即将第j 列前 i 行的值压缩到map[i][j]求第 x 行到第 y 行之间最大连续矩阵和,就将 x~y 行同列元素当成一个元素处理这样就将 x~y 行压缩成了...
分类:其他好文   时间:2014-04-29 11:13:45    阅读次数:318
【线段树五】HDU 1698 Just a Hook
Just a HookTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 15093Accepted Submission(s): 7489Proble...
分类:其他好文   时间:2014-04-29 10:32:46    阅读次数:457
组合数学笔记
组合数学、-排列组合数----sum求sum=sum*(m--)/i;----二维数组递推(打表)---原始公式(单个)数字太大,用分子分母约分-全排列模板-----生成全排列函数prev_permutation和next_permutation区别http://www.cnblogs.com/zh...
分类:其他好文   时间:2014-04-29 10:31:46    阅读次数:408
hdu 1431
第一次打表一言难尽 注意表的范围 因为打表 数组长度不好计算算 要有个结尾标志#includeusing namespace std;int prime[1000]={5,7,11,101,131,151,181,191,313,353,373,383,727,757,787,797,919,9.....
分类:其他好文   时间:2014-04-29 10:27:47    阅读次数:471
hdu 1.3.1 Moving Tables
这道题比较简单,就是用数组存取其路径。如101和102是对门,其过道号可以记为51. 1和2之间的为1. 今早突然收到操作系统停课的通知,哈哈 回来就做一下水题,开心 1 #include 2 #include 3 int main() 4 { 5 //freopen("input.txt"...
分类:其他好文   时间:2014-04-29 09:15:47    阅读次数:370
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!