- 博客(10)
- 收藏
- 关注
原创 ZOJ 2110 Tempter of the Bone (DFS)
Tempter of the BoneTime Limit: 2 Seconds Memory Limit: 65536 KB The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began t
2016-02-27 18:16:42 431
原创 hdu 1215 七夕节(求因子之和)
//解题方法:类似筛法求素数的算法,令每一个数的倍数都加入这个数本身的值,将结果打表。#include #include using namespace std;const int Max=500005;int a[Max];int main(){ int i,n,j,t,num; memset(a,0,sizeof(a)); for(i=2;i<=Max
2016-02-26 22:39:20 406
原创 hdu 2136 Largest prime factor
Largest prime factorTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5812 Accepted Submission(s): 1768 Problem Des
2016-02-26 22:24:23 271
原创 hdu1071 The area
The areaProblem DescriptionIgnatius bought a land last week, but he didn't know the area of the land because the land is enclosed by a parabola and a straight line. The picture below
2016-02-25 23:04:56 355
原创 hdu 1722 Cake
思路:最大公约数 + 数学公式具体做法:p+q-gcd(p,q)至于为什么gcd(p,q)是两种切法的公共部分:可以这么考虑,k=gcd(p,q),1/k可以整除1/p和1/q,即将蛋糕切成k份,无论是切p份还是切q份都可以满足要求,切痕重合。#include #include using namespace std;int gcd(int m,int n){ i
2016-02-23 12:42:34 416
原创 codeforces 614B
codeforces 614B 传送门模拟题题目大意,给几个数,定义像这种一个1后面全是零的整百整千整万的叫美丽的数。如:1,100,1000000,1000000000确保给出的数里只有一个不美丽的数,求这些数的乘积。方法,分类第一类,0,那么就不用继续了,直接输出0第二类,美丽的数,统计美丽数后面0的个数,最后直接输出后面的0第三类,不美丽的数,因为题目确保只有一个,所以只要把这个数记下来就行
2016-02-04 12:41:20 417
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人