码迷,mamicode.com
首页 >  
搜索关键字:scala for if match while    ( 37974个结果
hdu 2897(威佐夫博奕变形)
题意:容易理解。分析:当n%(p+q)==0时,先取者必胜,必胜方案:先取q,然后对方去x个,先取者就取(p+q-x)个,最后对方就必须取玩p个,当n%(p+q)==r(rp&&r#include#includeint main(){ int n, p, q; while(scanf("...
分类:其他好文   时间:2014-05-20 01:31:58    阅读次数:233
VLV INDEX
Normally, when the Directory Server conducts a search, the server looks through the entire entry for a match, throughout the entire directory. For lar...
分类:其他好文   时间:2014-05-20 01:23:35    阅读次数:277
第七章 循环语句
第七章 循环语句1. 循环语句的老祖宗--Goto语句(可用do…while();代替) 1 //①goto语句的使用(一般情况不用,但想在多重循环中一下子跳到外面时可以用)*******************① 2 int i=0; 3 number: i++; 4...
分类:其他好文   时间:2014-05-19 22:45:52    阅读次数:361
hadoop中日志聚集问题
遇到的问题:当点击上面的logs时,会出现下面问题:这个解决方案为:By default, Hadoop stores the logs of each container in the node where that container was hosted. While this is irre...
分类:其他好文   时间:2014-05-19 10:33:13    阅读次数:369
快速排序
void quickSort(int *a1 , int *a2){ int i=0 , j=a2-a1-1; if (i>=j) return; swap(a1[0] , a1[rand()%j+1]); while( ia1[0]) --j; if(i<j)...
分类:其他好文   时间:2014-05-19 07:43:47    阅读次数:213
qt qsplashscreen 启动画面 延时
intdelayTime=3;QElapsedTimer timer;timer.start();while(timer.elapsed()<(delayTime*1000)){app.processEvents();}
分类:其他好文   时间:2014-05-17 17:45:54    阅读次数:209
计算十进制数转化成二进制时1的个数
#include using namespace std;int func(int x){ int cnt = 0; while (x) { cnt++; x = x&(x - 1); } return cnt;}int main(){ ...
分类:其他好文   时间:2014-05-17 14:54:19    阅读次数:194
Something Starts While Something Ends
(1)最终还是没能参加比赛,一次都没有机会。(2)有梦想,不到最后一刻不会放弃。(3)这里应该会搬次家,转到github上。(4)作为一个新手,什么东西都需要从头学起来,就从最基础的数据结构开始好了。待完成的任务:1-2-3-4-
分类:其他好文   时间:2014-05-17 14:38:01    阅读次数:244
【scala初学】scala IDE eclipse
上一篇我们讲了scala入门,但毕竟不是把他弄的跟脚本语言似的,scala宣扬的是要代替java啊,那我们就看他如何抢夺java的位置。scala常用的编辑器,见如下:Eclipse(usingoneoftwoshoddyandunstableScalaplugins)EmacsIntelliJ(basicallyjustsyntaxhighlightingsupport)TextMate..
分类:系统相关   时间:2014-05-16 02:26:39    阅读次数:425
Python重写C语言程序100例--Part5
''' 程序31】 题目:请输入星期几的第一个字母来判断一下是星期几,如果第一个字母一样,则继续    判断第二个字母。 1.程序分析:用情况语句比较好,如果第一个字母一样,则判断用情况语句或if语句判断第二个字母。 2.程序源代码: ''' from sys import stdin letter = stdin.read(1) stdin.flush() while letter != 'Y...
分类:编程语言   时间:2014-05-16 01:47:37    阅读次数:272
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!