自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 hdu 5563 (判定正五角星)

题目:http://acm.hdu.edu.cn/showproblem.php?pid=5563#include"iostream" #include"cstdio" #include"cmath" using namespace std; typedef struct {double x,y;}point; double d(point &p1,point &p2) { double

2015-11-29 22:17:52 276

原创 hdu 5585 Numbers(字符串模拟大数)

题目:http://acm.hdu.edu.cn/showproblem.php?pid=5585#include #include"cstring" using namespace std; int main() { char str[31]; int length; bool flag; while(cin.getline(str+1,30)) {

2015-11-29 22:11:00 220

原创 Poj 1006 中国剩余定理

Description 人生来就有三个生理周期, 分别为体力、感情和智力周期,它们的周期长度为23天、28天和33天。每一个周期中有一天是高峰。在高峰这天,人会在相应的方面表现出色。例如,智力周 期的高峰,人会思维敏捷,精力容易高度集中。因为三个周期的周长不同,所以通常三个周期的高峰不会落在同一天。对于每个人,我们想知道何时三个高峰落在同 一天。对于每个周期,我们会给出从当前年份的第一天开始,到

2015-11-21 22:13:36 236

原创 POJ2407 欧拉函数

Relatives( POJ2407)         给出n(n求小于等于n且与n互质的元素个数。   思路:欧拉函数解决  #include"iostream" #include"cstdio" #include"cmath" using namespace std; typedef long long LL; int main() { LL n,res; w

2015-11-21 22:09:45 271

原创 Poj 1061 青蛙的约会(扩展欧几里得)

两个青蛙在赤道上跳跃,走环路。起始位置分别为x,y。每次跳跃距离分别为m,n。赤道长度为L。两青蛙跳跃方向与次数相同的情况下,问两青蛙是否有方法跳跃到同一点。输出最少跳跃次数。  Input       输入只包括一行5个整数x,y,m,n,L,其中x≠y ,0 、n ,0 。  Output       输出碰面所需要的跳跃次数,如果永远不可能碰面则输出一行"Impossible" S

2015-11-21 22:06:48 189

原创 poj 1811

例4-7 Prime( POJ1811) 给出一个数N(N,若它是素数,输出“Prime”,否则输出他的最小质因数。 解题思路: 数据范围大,用M-R算法进行素数判断,用Pollard_Rho法进行大数分解。 #include"stdio.h" #include"stdlib.h" #include"iostream" #include"ctime" using namespace std

2015-11-21 21:46:27 230

原创 poj2010

#include"iostream" #include"cstdio" #include"queue" #include"algorithm" using namespace std; struct Cow{int s,f;}cow[101000]; bool cmp(const Cow &a,const Cow &b) { if(a.s!=b.s) return a.s>b

2015-11-17 21:53:00 295

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除