码迷,mamicode.com
首页 >  
搜索关键字:while break continue    ( 40024个结果
java系统性能分析
netstat -ano | findstr 31900注意最后是pid堆栈的作用: 线程死锁分析 辅助CPU过高分析 线程资源不足分析 性能瓶颈分析 关键线程异常退出Windows:在运行java的控制台上按ctrl+break组合键 _ usefull?wait() —— 会释放监视锁slee....
分类:编程语言   时间:2014-07-22 22:50:16    阅读次数:250
hdu 1556 Color the ball
基础  树状数组 每输入一组数,就对染色次数进行修改; #include #include #include using namespace std; int s[100005],a; int low(int i) { return i&(-i); } void show(int q,int w) { while(q>0) { s[q]+=w;...
分类:其他好文   时间:2014-07-22 22:49:35    阅读次数:188
break和continue的区别
break和continue的区别 1、break用于完全结束一个循环,跳出循环体;break不仅可以结束其所在的循环,还可以结束其外层循环。 2、continue只是终止本次循环,接着开始下一次循环。...
分类:其他好文   时间:2014-07-20 10:17:28    阅读次数:161
Codeforces Jzzhu and Sequences(循环节)
# include int f[10]; int main() { int x,y,n,j; while(~scanf("%d%d%d",&x,&y,&n)) { f[1]=x; f[2]=y; for(j=3;j<=6;j++) { f[j]=f[j-1]-f[j-2]; } n%=6; if(n==0) n=6; if(f[...
分类:其他好文   时间:2014-07-20 10:14:09    阅读次数:137
ML | k-means
what's xxxk-means clustering tends to find clusters of comparable spatial extent, while the expectation-maximization mechanism allows clusters to have...
分类:其他好文   时间:2014-07-20 09:17:04    阅读次数:227
uva 232 - Crossword Answers
代码又是挺乱的,时间太紧没空整理,思路也不好~但能AC…… 看不清楚可以留言,或者加qq一起探讨 #include #include #include using namespace std; char s[11][11]; int num[11][11]; int vis[11][11]; int main() { int r,c; int t=0; while(sc...
分类:其他好文   时间:2014-07-19 23:38:39    阅读次数:313
0 1背包模板
# include # include # include # define max(x,y) x>y?x:y; int v[1001];//价值 int w[1001];//重量 int dp[1001][1001]; int main() { int n,m; while(scanf("%d%d",&m,&n)!=EOF) { memset(dp,...
分类:其他好文   时间:2014-07-19 23:38:19    阅读次数:309
欧几里得(模板)
int gcd(int n,int m)//n>m { //最大公约数 int r; while(m) { r = n%m; n = m; m = r; } return n; } int kgcd(int a,int b) { if(!a) return b; if(!b) retu...
分类:其他好文   时间:2014-07-19 23:37:19    阅读次数:309
python中的yield
例如这个函数 def fab(max): n, a, b = 0, 0, 1 while n < max: yield b # print b a, b = b, a + b n = n + 1 简单地讲,yield 的...
分类:编程语言   时间:2014-07-19 23:15:12    阅读次数:247
C++中如何split字符串(转)
#include #include #include using namespace std;int main(){ string s("Somewhere down the road"); istringstream iss(s); while (iss) ...
分类:编程语言   时间:2014-07-19 23:13:54    阅读次数:248
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!