Problem Description
One day, Alice and Bob felt bored again, Bob knows Alice is a girl who loves math and is just learning something about matrix, so he decided to make a crazy problem for her.Bob has...
分类:
其他好文 时间:
2015-03-16 19:22:16
阅读次数:
102
Crazy TankTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5033 Accepted Submission(s): 1017Proble...
分类:
其他好文 时间:
2015-03-12 09:40:58
阅读次数:
140
Dsecriptionn participants of «crazy tea party» sit around the table. Each minute one pair of neighbors can change their places. Find the minimum time ...
分类:
其他好文 时间:
2015-03-08 21:19:43
阅读次数:
199
题意:输入一个n,计算ans= 1^n+2^n+3^n+4^n ,输出ans末尾几个0。
做法:规律题,刚开始暴力,看了下规律,发现最多末尾只会有2个零。而且有一定规律。所以可以找循环节,n%20。 或者用快速幂,我用快速幂,循环了一遍1到300000,发现确实末尾最多只有两个0,所以。。。...
分类:
其他好文 时间:
2015-03-07 20:02:28
阅读次数:
183
URAL 1295. Crazy Notions(数学啊 & 找规律)...
分类:
其他好文 时间:
2015-03-07 11:38:06
阅读次数:
124
Problem地址:http://acm.hdu.edu.cn/showproblem.php?pid=1381此题可以用哈希数组求解,至于什么是哈希,可以先看以下这篇推荐文章,写得挺不错的。推荐:http://www.cnblogs.com/yangecnu/p/Introduce-Hashtab...
分类:
其他好文 时间:
2015-02-09 00:44:07
阅读次数:
247
http://acm.hdu.edu.cn/showproblem.php?pid=4336
Problem Description
In your childhood, do you crazy for collecting the beautiful cards in the snacks? They said that, for example, if you collect...
分类:
其他好文 时间:
2015-02-04 18:44:41
阅读次数:
177
题意就是说把顺时针排的1到n换成逆时针排的需要的最少交换步数。如果是线形的一串数,需要的交换次数就是个冒泡排序的交换次数:n*(n-1)/2,或者用a[i]=(i-1)+a[i-1]推出来。对于环形,切成两个线形就行了,通过观察规律知:越接近平均切开越好。#include#include#inclu...
分类:
其他好文 时间:
2015-02-04 00:25:38
阅读次数:
223
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3157You’ve just built a circuit board for your new robot, and now you need to power it. Your robot circ...
分类:
其他好文 时间:
2015-02-03 20:59:07
阅读次数:
429
DescriptionThough ZCC has many Fans, ZCC himself is a crazy Fan of a coder, called "Memset137".It was on Codefires(CF), an online competitive programm...
分类:
其他好文 时间:
2015-02-01 20:16:10
阅读次数:
238