码迷,mamicode.com
首页 >  
搜索关键字:only prime factors    ( 11256个结果
LeetCode——Gray Code
The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total number...
分类:其他好文   时间:2014-04-30 00:21:32    阅读次数:536
hud 1397
没说的 暴力打表#include#includeusing namespace std;int a[62768];int b[42768];int prime[42768];int main(){ int n=0,j,i; memset(b,0,sizeof(b)); memset...
分类:其他好文   时间:2014-04-29 18:24:19    阅读次数:435
POJ 3356 AGTC(DP-最小编辑距离)
DescriptionLetxandybe two strings over some finite alphabetA. We would like to transformxintoyallowing only operations given below:Deletion:a letter i...
分类:其他好文   时间:2014-04-29 16:22:00    阅读次数:450
InPlace Transition of a matrix
Problem illustration:given a n*n matrix, print its transition, for example , 90 degree clockwise,using only constant additional spaceanalysis:using O(...
分类:其他好文   时间:2014-04-28 03:22:07    阅读次数:513
《Cracking the Coding Interview》——第16章:线程与锁——题目4
2014-04-27 20:06题目:设计一个类,只有在不产生死锁的时候才分配资源。解法:不太清楚这个题是要分配何种资源,以何种形式?所以没能动手写个可运行的代码,只是闲扯了几句理论分析。代码: 1 // 16.4 Design a class which provides a lock only ...
分类:编程语言   时间:2014-04-28 01:21:58    阅读次数:558
设计模式之6大原则(5)-迪米特法则
迪米特法则(Law of Demeter)又叫作最少知识原则(Least Knowledge Principle 简写LKP),就是说一个对象应当对其他对象有尽可能少的了解,不和陌生人说话。英文简写为: LoD. 迪米特法则可以简单说成:talk only to your immediate friends。 对于面向OOD来说,又被解释为下面几种方式:一个软件实体应当尽可能少的与其他实...
分类:其他好文   时间:2014-04-27 18:00:46    阅读次数:534
11256条   上一页 1 ... 1124 1125 1126
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!