自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

转载 欧拉函数

原创网址:http://http://www.cnblogs.com/handsomecui/p/4755455.html欧拉函数                                     算法总结 一欧拉函数(Euler's totient function) 欧拉函数的定义:    在数论中,对于正整数N,少于或等于

2017-07-01 08:57:07 291

转载 欧几里德与扩展欧几里德算法

原创网址为:http://http://www.cnblogs.com/frog112111/archive/2012/08/19/2646012.html欧几里德算法------jumping_frog欧几里德算法又称辗转相除法,用于计算两个整数a,b的最大公约数。基本算法:设a=qb+r,其中a,b,q,r都是整数,则gcd(a,b)=gcd(b,r),即gcd(a

2017-07-01 08:47:11 160

转载 poj2115 扩展欧几里德算法小结

原创网址:http://blog.csdn.net/non_cease/article/details/7364092以下是学习扩展欧几里德算法的资料的整合,有的转自别处,如百度百科。扩展欧几里德算法源于欧几里德算法。欧几里德算法:gcd(a,b)= gcd(b,a%b)。证明:a可以表示成a = kb + r,则r = a mod b

2017-06-30 21:18:02 233

原创 POJ_2082_Terrible Sets

POJ_2082_Terrible Sets单调栈

2016-07-30 19:40:48 396

原创 POJ 2823 Sliding Window

Sliding WindowTime Limit: 12000MS Memory Limit: 65536KTotal Submissions: 53791 Accepted: 15431Case Time Limit: 5000MSDescriptionAn array of size n ≤ 106 is

2016-07-29 15:25:21 270

原创 HDU 1548 A strange lift

A strange liftProblem DescriptionThere is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.The lift have just two buttons: u

2016-07-18 20:49:22 295

原创 HDU 1010 Tempter of the Bone

Tempter of the BoneProblem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel th

2016-07-18 20:12:03 181

原创 HDU 1258 Sum It Up

Sum It UpProblem DescriptionGiven a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t=4, n=6, and the list is [4,

2016-07-18 19:43:06 197

原创 hdu 1728 逃离迷宫

逃离迷宫Problem Description  给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,gloria是个没什么方向感的人,因此,

2016-07-18 19:06:04 4421 1

原创 POJ 3984 迷宫问题

迷宫问题Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 15397 Accepted: 9144Description定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0

2016-07-18 18:50:50 293

原创 HDU 2553 N皇后问题

N皇后问题题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2553在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。你的任务是,对于给定的N,求出有多少种合法的放置方法。Input共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。Output共有若干行,每行

2016-07-17 11:47:47 177

原创 POJ_2488: A Knight's Journey

题目链接:http://poj.org/problem?id=2488POJ 2488 DFS

2016-07-16 11:03:09 313

空空如也

空空如也

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

TA关注的人

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