觉得浮夸了四年,漠然发现原来是浮躁了四年!

12 2012 档案

摘要:http://acm.hdu.edu.cn/showproblem.php?pid=3123题目给出的n很大,很明显如果n很大时,是不用处理到n的,所以其中必有蹊跷!当n大于m时 ,n的阶乘中必定包含因数m,所以取余后必定为0;这是本体的关键。View Code 1 #include<stdio.h> 2 #include<string.h> 3 int main() 4 { 5 __int64 ans,sum,temp,max; 6 char str[150]; 7 int t,m,len; 8 int i; 9 scanf("%d",&t 阅读全文
posted @ 2012-12-31 21:10 heat nan 阅读(198) 评论(0) 推荐(0) 编辑
摘要:The usage of getline();#include<iostream>#include<map>#include<string>using namespace std;int main(){ int n; cin>>n; int p=1; while(n--) { int num; string str; cin>>num; getchar(); getline(cin,str); int m; int a[600]; cin... 阅读全文
posted @ 2012-12-29 15:21 heat nan 阅读(133) 评论(0) 推荐(0) 编辑
摘要:Problem link adress:click hereThis isabasic BFS problem.But the way of knight'smove is strange,if you don't know the law of the knight's move,you are likely to cann't work the problem out.However,if you can find the regularity of the problem from the given cases's data,you must b 阅读全文
posted @ 2012-12-22 22:55 heat nan 阅读(270) 评论(0) 推荐(0) 编辑
摘要:Problem link adress :hdu 4460Problem analysis:For this problem,first give you some people's name and then give you the relations of them.Now,you task is calculate the maximum steps between the every two guys.To solve the problem,you just need to calculate all the steps between the every two guys 阅读全文
posted @ 2012-12-19 18:58 heat nan 阅读(263) 评论(0) 推荐(0) 编辑
摘要:A very hard Aoshu problemProblem DescriptionAoshu is very popular among primary school students. It is mathematics, but much harder than ordinary mathematics for primary school students. Teacher Liu is an Aoshu teacher. He just comes out with a problem to test his students: Given a serial of digits, 阅读全文
posted @ 2012-12-18 22:51 heat nan 阅读(215) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示