取石子。。。nyoj---23
摘要:取石子(一)时间限制:3000ms | 内存限制:65535KB难度:2描述一天,TT在寝室闲着无聊,和同寝的人玩起了取石子游戏,而由于条件有限,他/她们是用旺仔小馒头当作石子。游戏的规则是这样的。设有一堆石子,数量为N(1 2 int main() 3 { 4 int N,M,T; 5 scanf("%d",&T); 6 while(T--) 7 { 8 scanf("%d%d",&N,&M); 9 if(N%(M+1)==0)/*博弈思想,要保持给对手留下(m+1)的倍数,就能获胜*/10 printf("Lo...
阅读全文
posted @
2013-07-25 19:32
yun_
阅读(160)
推荐(0)
字串和。。。。nyoj----44
摘要:子串和时间限制:5000ms | 内存限制:65535KB难度:3描述给定一整型数列{a1,a2...,an},找出连续非空子串{ax,ax+1,...,ay},使得该子序列的和最大,其中,1 2 int main() 3 { 4 int T,N,a[1000010],i; 5 scanf("%d",&T); 6 while(T--) 7 { 8 int sum,max; 9 scanf("%d",&N);10 for(i=0;i<N;i++)11 scanf("%d",&a[i]);12 ...
阅读全文
posted @
2013-07-25 17:30
yun_
阅读(153)
推荐(0)
Max sum。。。。。hdu oj----1003
摘要:Max sumTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 111859Accepted Submission(s): 25831Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the ma
阅读全文
posted @
2013-07-25 16:00
yun_
阅读(275)
推荐(0)
最高奖学金。。nyoj----60
摘要:谁获得了最高奖学金时间限制:1000ms | 内存限制:65535KB难度:2描述某校的惯例是在每学期的期末考试之后发放奖学金。发放的奖学金共有五种,获取的条件各自不同: 1) 院士奖学金,每人8000元,期末平均成绩高于80分(>80),并且在本学期内发表1篇或1篇以上论文的学生均可获得; 2) 五四奖学金,每人4000元,期末平均成绩高于85分(>85),并且班级评议成绩高于80分(>80)的学生均可获得; 3) 成绩优秀奖,每人2000元,期末平均成绩高于90分(>90)的学生均可获得; 4) 西部奖学金,每人1000元,期末平均成绩高于85分(>85)的西
阅读全文
posted @
2013-07-11 16:13
yun_
阅读(320)
推荐(0)
coin test。。。。nyoj--204
摘要:Coin Test时间限制:3000ms | 内存限制:65535KB难度:1描述As is known to all,if you throw a coin up and let it droped on the desk there are usually three results. Yes,just believe what I say ~it can be the right side or the other side or standing on the desk, If you don't believe this,just try In the past there
阅读全文
posted @
2013-07-11 11:23
yun_
阅读(303)
推荐(0)
蛇形填数nyoj--33
摘要:蛇形填数时间限制:3000ms | 内存限制:65535KB难度:3描述在n*n方陈里填入1,2,...,n*n,要求填成蛇形。例如n=4时方陈为:10 11 12 19 16 13 28 15 14 37 6 5 4输入直接输入方陈的维数,即n的值。(n 2 #include 3 int main() 4 { 5 int aa[105][105]; 6 int n,x,a,b,i,j; 7 scanf("%d",&n); 8 x=1;//第一个元素从 1 开始, 9 memset(aa,0,sizeof(aa));10 ...
阅读全文
posted @
2013-07-10 10:42
yun_
阅读(225)
推荐(0)