题意:容易理解。分析:当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
第七章 循环语句1. 循环语句的老祖宗--Goto语句(可用do…while();代替) 1
//①goto语句的使用(一般情况不用,但想在多重循环中一下子跳到外面时可以用)*******************① 2 int i=0; 3
number: i++; 4...
分类:
其他好文 时间:
2014-05-19 22:45:52
阅读次数:
361
题目来源:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3490题意: 给出两个集合Y
, N , 给出区间【low , high】 , 问在 这个区间有多少个这样的数,x , 满足, 集合Y中至少一个数被x 整除, 且 集合 ...
分类:
其他好文 时间:
2014-05-19 10:35:04
阅读次数:
256
遇到的问题:当点击上面的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
Delphi从XE以后集成里SVN客户端, 安装完Delphi以后,
在bin\subversion下, 存放的就是SVN客户端文件,
可惜版本有点低(好像是1.7的)如果想更新成高版本的客户端文件按下面的方法:1.到collab的网站SVN下载页面:http://www.collab.net/do...
分类:
其他好文 时间:
2014-05-19 08:48:28
阅读次数:
238
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
intdelayTime=3;QElapsedTimer
timer;timer.start();while(timer.elapsed()<(delayTime*1000)){app.processEvents();}
分类:
其他好文 时间:
2014-05-17 17:45:54
阅读次数:
209
#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
(1)最终还是没能参加比赛,一次都没有机会。(2)有梦想,不到最后一刻不会放弃。(3)这里应该会搬次家,转到github上。(4)作为一个新手,什么东西都需要从头学起来,就从最基础的数据结构开始好了。待完成的任务:1-2-3-4-
分类:
其他好文 时间:
2014-05-17 14:38:01
阅读次数:
244
sendfd.c
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define ERR_EXIT(m) do { perror(m); \...
分类:
其他好文 时间:
2014-05-16 01:27:02
阅读次数:
294