码迷,mamicode.com
首页 >  
搜索关键字:consecutive numbers    ( 8082个结果
hdu 4006 The kth great number,set,priority_queue
The kth great number Xiao Ming and Xiao Bao are playing a simple Numbers game. In a round Xiao Ming can choose to write down a number, or ask Xiao Bao what the kth great number is. Because the numb...
分类:其他好文   时间:2014-09-22 19:12:13    阅读次数:197
UVA 10474 - Where is the Marble?
Where is the Marble?   Where is the Marble?  Raju and Meena love to play with Marbles. They have got a lot of marbles with numbers written on them. At the beginning, Raju wou...
分类:其他好文   时间:2014-09-22 01:04:21    阅读次数:477
zoj 1095 - Humble Numbers
题目:找到用2,3,5,7为数的因第n个数字。 分析:dp,数据结构。类似于合并果子的队列维护,用4根指针分别指向队列,用当前的数乘以对应数字即可。 说明:(2011-09-19 01:42) #include using namespace std; int F[ 5845 ]; int n[ 4 ] = {2,3,5,7}; int p[ 4 ]; int main() { ...
分类:其他好文   时间:2014-09-21 23:57:21    阅读次数:345
【POJ1338】Ugly Numbers(暴力打表)
打表大军是一股邪恶势力→_→ 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 us...
分类:其他好文   时间:2014-09-21 19:25:51    阅读次数:781
Hunt the Wumpus第二个版本---多怪兽,多洞穴,洞穴间双向互通
其中,将洞穴连起来的算法要好好体会。学习构建临时变量列表,确认循环用FOR,非确定循环用 WHILE,并定好退出条件。from random import choicecave_numbers = range(0,20)caves = []for i in cave_numbers: cave...
分类:其他好文   时间:2014-09-21 00:04:59    阅读次数:431
吃午饭前,按书上的代码写会儿--Hunt the Wumpus第一个版本
有空就要慢慢练起~~~~脑袋动起来是很快乐的事儿。。。。:)《易学PYTHON》演练一遍。from random import choicecave_numbers = range(1,21)wumpus_location = choice(cave_numbers)player_location ...
分类:其他好文   时间:2014-09-20 15:15:27    阅读次数:182
[leetcode] Combinations @ Python [ask for help]
https://oj.leetcode.com/problems/combinations/Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.For example,If ...
分类:编程语言   时间:2014-09-20 09:58:07    阅读次数:204
[leetcode]Next Permutation @ Python
原题地址:https://oj.leetcode.com/problems/next-permutation/题意:Implement next permutation, which rearranges numbers into the lexicographically next greater...
分类:编程语言   时间:2014-09-20 07:44:56    阅读次数:241
sqlite 数据库
数据库(database):存放数据的仓库.存放的是一张一张的表,特别像:Excel,Numbers都以表格形式存放数据.可以创建多张表,常见的数据库:sqlite,MySQL,SQLServer,Oracle,access为什么要用到数据库.1.文件读写,归档读取数据时需要一次把数据全部读出来.占内存,2.数据库效率很高.体现在..
分类:数据库   时间:2014-09-20 02:23:16    阅读次数:235
[数位dp] spoj 10738 Ra-One Numbers
题意:给定x、y,为[x,y]之间有多少个数的偶数位和减去奇数位和等于一。 个位是第一位。 例子: 10=1-0=1 所以10是这样的数 思路:数位dp[i][sum][ok] i位和为sum 是否含有前导0. 然后就是因为有负数 所以根据范围把0设置为100 然后最后和等于101则为所求的数。 代码: #include"cstdlib" #include"cstdio" #inclu...
分类:其他好文   时间:2014-09-19 17:43:29    阅读次数:186
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!