码迷,mamicode.com
首页 >  
搜索关键字:循环 if for while case    ( 74454个结果
hdu1022 train problem 栈的应用
#include #include #include using namespace std;int main(){ int n; while(cin >> n) { stack one; string od1,od2; bool stat...
分类:其他好文   时间:2014-05-21 23:48:58    阅读次数:370
比较字符串总结:如果计算两个字符串的相似度或者距离
有关字符串相关比较问题,一般处理方法都选择动态规划处理方法。或者是单个循环,或者是多个循环;dp遇到这种两个串的问题,很容易想到DP。但是这道题的递推关系不明显。可以先尝试做一个二维的表int[][] dp,用来记录匹配子序列的个数(以S="rabbbit",T="rabbit"为例): r a b...
分类:其他好文   时间:2014-05-21 23:01:16    阅读次数:229
sql基础复习
--1、while循环declare @sum intdeclare @i intset @i=1set @sum=0while(@i90) print @iendprint @sum--2、goto语句declare @num intset @num=100flag:print @numsel.....
分类:数据库   时间:2014-05-21 22:20:40    阅读次数:468
Lock-free vs. wait-free concurrency
There are two types of non-blocking thread synchronization algorithms - lock-free, and wait-free. Their meaning is often confused. In lock-free systems, while any particular computation may be block...
分类:其他好文   时间:2014-05-21 10:27:20    阅读次数:410
Hbase0.96源代码之HMaster(三)Hmaster主要循环
1,Master初始化 1.1 if (!this.stopped) { finishInitialization(startupStatus, false); loop(); } 1.2 finishInitialization(),这里主要完成master组件components:filesystem manager,servermanager,assig...
分类:其他好文   时间:2014-05-21 09:23:05    阅读次数:269
HRBUST 1328 相等的最小公倍数
SOl:将原题改为枚举N的每一对因子,计算其是否互素即可。 #include #include #include using namespace std; inline int gcd(int a,int b) { return b==0?a:gcd(b,a%b); } int main() { int n,T,i,j; scanf("%d",&T); while(T...
分类:其他好文   时间:2014-05-21 07:07:00    阅读次数:273
经典C语言程序设计100例 -- C 和 Python 版 (06 - 10)
【06】格式化输出 题目:用*号输出字母C的图案。 思路:可先用'*'号在纸上写出字母C,再分行输出。如果输出图形较大,且有规律可循,可考虑使用循环。 C 语言代码 int main() { const char *p = " **** \n" " ** ** \n" "** \n"...
分类:编程语言   时间:2014-05-21 06:25:40    阅读次数:305
脸上不同部位长痘痘原因
1、 额头长痘:压力大,脾气差,造成心火和血液循环有问题。 应早睡早起,多喝水。 2、 双眉间长痘:胸闷,心律不整,心悸。 不要做太过激烈的运动,避免烟、酒、辛辣食品。 3、 鼻头长痘:胃火过盛,消化系统异常。应少吃冰冷食物。 ...
分类:其他好文   时间:2014-05-21 04:03:20    阅读次数:206
青蛙跳孔解题
题目来自网上,如图:首先,建立一个模型。如图:设一圈共有n个孔,每个孔的标号,依次为:0,1,2,。。。n-1。在图中为内圈。当青蛙跳完第一圈,会循环进入第二圈,即从n-1孔,又回到了0,再1,2,3。。。为了便于分析,我们假设青蛙跳过n-1孔之后,进入第n个孔,然后再n+1,n+2,。。。即进入了...
分类:其他好文   时间:2014-05-21 03:50:58    阅读次数:283
解决SQLite异常:library routine called out of sequence
在项目开发中,使用SQLite一不小心就会碰到各种DB异常,网上搜了下没有这方面的资料,写出来记录下。异常信息:android.database.sqlite.SQLiteMisuseException: library routine called out of sequence: , while...
分类:数据库   时间:2014-05-21 03:12:20    阅读次数:1023
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!