码迷,mamicode.com
首页 >  
搜索关键字:add two numbers    ( 52886个结果
uva 10400 Game Show Math (填合适的运算符)
看到这种填合适的运算符之类的题目,第一感觉就是用dfs来枚举递归。 但邮箱道题目算法设计里面那么大的数据,想到有可能会超时。 用最直白的简单的方法dfs一遍后交上,超时。 ——需要判重和边界结束条件。 在所有能剪断的地方痛下狠手,狂加特判+return; 然后就炒鸡快了 #include #include #include #define ADD 32000 using namespa...
分类:其他好文   时间:2014-05-23 02:06:42    阅读次数:285
浅析MySQL各种索引
MySQL各种索引(因为是浅析大多都不刻意区分搜索引擎) INDEX(普通索引):最基本的索引,没有任何限制 ALTER TABLE `table_name` ADD INDEX index_name ( `column` ) UNIQUE(唯一索引):与"普通索引"类似,不同的就是:索引列的值必须唯一,但允许有空值。 ALTER TABLE `table_name` ADD UNIQUE (`column`) 注:创建唯一索引的目的不是为了提高访问速度,而只...
分类:数据库   时间:2014-05-23 01:24:44    阅读次数:313
LeetCode: Permutations [045]
【题目】 Given a collection of numbers, return all possible permutations. For example, [1,2,3] have the following permutations: [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [3,2,1]. 【题意】 给定一个数组,生成所有的全排列 【思路】 递归,类DFS...
分类:其他好文   时间:2014-05-23 01:08:26    阅读次数:194
2014北京邀请赛(部分题解)
马上要去比赛了。 今天做了一下2014北京邀请赛,出了两道题目,感觉很水啊、、、 首先H题: H. Happy Reversal Time Limit: 1000ms Case Time Limit: 1000ms Memory Limit: 65536KB 64-bit integer IO format: %lld      Java class name...
分类:其他好文   时间:2014-05-22 23:07:32    阅读次数:417
LightOJ-1140-How Many Zeroes?
Jimmy writes down the decimal representations of all natural numbers between and including m and n, (m ≤ n). How many zeroes will he write down? Input Input starts with an integer T (≤ 11000), denot...
分类:其他好文   时间:2014-05-22 22:59:18    阅读次数:354
window server2008 映射端口
例如:开放8080端口 netsh firewall add portopening TCP 8080 MyWebPort 8080端口号 MyWebPort 名称 可任意取...
分类:Windows程序   时间:2014-05-22 22:57:56    阅读次数:343
git恢复被修改的文件
恢复到最后一次提交的改动: git checkout -- + 需要恢复的文件名 但是,需要注意的是,如果该文件已经 add 到暂存队列中,上面的命令就不灵光喽 需要先让这个文件取消暂存: git reset HEAD -- + 需要取消暂存的文件名 然后再使用第一条命令。 如果感觉命令多了记不住,那就做一两个匿名呗,比如: git config...
分类:其他好文   时间:2014-05-22 22:57:17    阅读次数:289
欧拉项目004:寻找最大的回文数
Problem 4: Largest palindrome product A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest pal...
分类:其他好文   时间:2014-05-22 18:48:46    阅读次数:355
工资类
#include using namespace std; class Salary//工资类 { public: void set_salarys( );//设置工资 void add_salarys(int x);//增加工资 void sort_salarys();//根据工资由大到小排序 void show_salarys( );//显示工人...
分类:其他好文   时间:2014-05-22 17:33:38    阅读次数:312
LeetCode: Permutations II [046]
【题目】 Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example, [1,1,2] have the following unique permutations: [1,1,2], [1,2,1], and [2,1,1]. 【题意】 给定一个候选数集合,候选集中可能存在重复数,返回所有的排列 【思路】 ...
分类:其他好文   时间:2014-05-22 17:32:17    阅读次数:247
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!