码迷,mamicode.com
首页 >  
搜索关键字:while break continue    ( 40024个结果
Quartz.Net任务调度框架
本文转载:http://www.tuicool.com/articles/YVbamyiQuartz.Net是一个开源的任务调度框架,非常强大,能够通过简单的配置帮助我们定时具体的操作。相对于我们用的线程里面while(true)然后sleep来执行某个操作,应该算的上是高端,大气,上档次了。目前最...
分类:Web程序   时间:2014-07-27 10:10:12    阅读次数:302
hdoj 2041 超级阶梯
代码:#include int main(){int n;int i;int m;int count;int dp[50];while(scanf("%d",&n)!=EOF){dp[1]=1;dp[2]=1;dp[3]=2;while(n--){count=0;scanf("%d",&m);for...
分类:其他好文   时间:2014-07-26 14:57:10    阅读次数:244
hdoj 2031 进制转换
代码:#includechar b[]="0123456789ABCDEF" ;int main(){int n,k;while(scanf("%d%d",&n,&k)!=EOF){char a[50]={'\0'};int i=0,ok;ok=(n>=0)?0:n=-n,1; while(n){ ...
分类:其他好文   时间:2014-07-26 14:47:20    阅读次数:339
C语言读取 未知长度 的矩阵
1、确定矩阵行数: 使用每次读取一行函数fgets … row = 0; while(fgets(buf, buflen, fp) != NULL) row++; …2、确定矩阵列数:…rewind(fp);col = 0;ch = fgetc(fp);while(ch != ‘\n’){ if(c...
分类:编程语言   时间:2014-07-26 14:05:45    阅读次数:265
shell编程(十五)--- while特殊用法和函数
break:退出循环体 continue:结束本次循环,进入下一次循环。while特殊用法1: while: do done 上述为while的死循环。while特殊用法2: whilereadLINE do done</path/to/FILE 作用:通过while读取FILE文件中的每一行,并将其保存在变量LINE中。函数:function语法格式:..
分类:其他好文   时间:2014-07-26 03:25:37    阅读次数:206
社保系列3——文件结构
1.CMap. UINT AFXAPI HashKey(CString& string) { LPCTSTR key=(LPCTSTR)string; UINT nHash=0; while(*key) { nHash=(nHash<<5)+nHash+*key++; } return nHash; } int main() { CMap CMapS...
分类:其他好文   时间:2014-07-26 03:03:07    阅读次数:260
A. Game With Sticks
其实就会找出xy最小的一个,再判断奇偶就OK #include #include using namespace std; int main(){     int x,y;     while(cin>>x>>y){         int t=x>y?y:x;         if(t%2==0)             printf("Malvika\n");       ...
分类:其他好文   时间:2014-07-26 03:02:56    阅读次数:197
hdu1298 T9(手机输入法,每按一个数字,找出出现频率最高的字串,字典树+DFS)
Problem Description A while ago it was quite cumbersome to create a message for the Short Message Service (SMS) on a mobile phone. This was because you only have nine keys and the alphabet has more t...
分类:移动开发   时间:2014-07-26 02:40:36    阅读次数:332
【找规律】CodeForce #258 Problem A——Game With Sticks
来源:点击打开链接 很简单,找规律。 每去掉一个点,点的总数量就减去n+m-1,然后看谁最先减到没有点可减,就可以了。 #include #include using namespace std; int main() { int n,m; cin>>n>>m; int totalpoint=n*m; int count=0; while(totalpoint>0) { ...
分类:其他好文   时间:2014-07-26 02:18:56    阅读次数:202
HDU 3172 Virtual Friends 带权并查集 -秩
ll T; while(~scanf("%d",&T)){ while(T--) {  = = ... 思路: 用秩合并,看了题解才发现 if(fx == fy)要输出当前集合的秩而不是0。。。 #include #include #include #include #include #include #include #include #include #inc...
分类:其他好文   时间:2014-07-26 02:14:47    阅读次数:222
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!