上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 41 下一页

ZOJ 3665 Yukari's Birthday

摘要: ZOJ Problem Set - 3665Yukari's BirthdayTime Limit: 2 Seconds Memory Limit: 32768 KBToday is Yukari's n-th birthday. Ran and Chen hold a celebration party for her. Now comes the most important part, birthday cake! But it's a big challenge for them to place n candles on the top of the cake 阅读全文
posted @ 2012-10-19 15:36 江财小子 阅读(403) 评论(0) 推荐(0) 编辑

欧拉函数

摘要: 欧拉函数为什么是积性函数?// 下面是百度上找的错误证明函数的积性即:若m,n互质,则φ(mn)=φ(m)φ(n)。由“m,n互质”可知m,n无公因数,所以φ(m)φ(n)=m(1-1/p1)(1-1/p2)(1-1/p3)…(1-1/pn)·n(1-1/p1')(1-1/p2')(1-1/p3')…(1-1/pn'),//这里已经用了欧拉公式,而欧拉公式是需要先有积性前提才推导的其中p1,p2,p3...pn为m的质因数,p1',p2',p3'...pn'为n的质因数,而m,n无公因数,所以p1,p2,p3...pn, 阅读全文
posted @ 2012-10-16 16:31 江财小子 阅读(1837) 评论(0) 推荐(1) 编辑

ZOJ 3657 The Little Girl who Picks Mushrooms

摘要: The Little Girl who Picks MushroomsTime Limit: 2 Seconds Memory Limit: 32768 KBIt's yet another festival season in Gensokyo. Little girl Alice planned to pick mushrooms in five mountains. She brought five bags with her and used different bags to collect mushrooms from different mountains. Each b 阅读全文
posted @ 2012-10-15 16:38 江财小子 阅读(545) 评论(0) 推荐(0) 编辑

hdu Paint the Wall 1543

摘要: Paint the WallTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 607Accepted Submission(s): 208Proble... 阅读全文
posted @ 2012-10-14 19:19 江财小子 阅读(502) 评论(0) 推荐(0) 编辑

hdu 1281 棋盘游戏

摘要: 棋盘游戏Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1315Accepted Submission(s): 757Problem Description小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格子才可以放,小希还是很轻松的解决了这个问题(见下图)注意不能放车的地方不影响车的互相攻击。所以现在Gardon想让小希来解决 阅读全文
posted @ 2012-10-10 19:24 江财小子 阅读(826) 评论(0) 推荐(0) 编辑

HDU 2119 Matrix

摘要: Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1076 Accepted Submission(s): 448Problem DescriptionGive you a matrix(only contains 0 or 1),every time you can select a row or a column and delete all the '1' in this row or this column .Your 阅读全文
posted @ 2012-10-10 18:23 江财小子 阅读(208) 评论(0) 推荐(0) 编辑

POJ 2104 K-th Number 划分树

摘要: Time Limit: 20000MSMemory Limit: 65536KTotal Submissions: 29149Accepted: 8799Case Time Limit: 2000MSDescriptionYou are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a new data structure that would be able to 阅读全文
posted @ 2012-10-08 22:41 江财小子 阅读(502) 评论(0) 推荐(0) 编辑

1523. K-inversions

摘要: http://acm.timus.ru/problem.aspx?space=1&num=1523Consider a permutation a1, a2, …, an (all ai are different integers in range from 1 to n). Let us call k-inversion a sequence of numbers i1, i2, …, ik such that 1≤i1<i2<…<ik≤n and ai1>ai2>…>aik. Your task is to evaluate the numbe 阅读全文
posted @ 2012-10-08 17:52 江财小子 阅读(304) 评论(0) 推荐(0) 编辑

HDU 4403 A very hard Aoshu problem

摘要: A very hard Aoshu problemTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 110Accepted Submission(s): 82Problem DescriptionAoshu is very popular among primary school students. It is mathematics, but much harder than ordinary mathematics for primary s 阅读全文
posted @ 2012-09-22 20:17 江财小子 阅读(517) 评论(0) 推荐(0) 编辑

FZU 1969 GCD Extreme UESTC 1723 吴神的大脑

摘要: Accept: 77Submit: 136Time Limit: 1000 mSecMemory Limit : 32768 KB Problem DescriptionGiven the value of N, you will have to find the value of G. The meaning of G is given in the following code G=0; for(i=1;i<N;i++) for(j=i+1;j<=N;j++) G+=gcd(i,j); /*Here gcd() is a function that finds the... 阅读全文
posted @ 2012-09-22 09:51 江财小子 阅读(696) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 41 下一页