自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

mowayao的专栏

为了再一次的遇见

  • 博客(219)
  • 收藏
  • 关注

原创 换窝了。。。http://yaozeping.com

rt

2014-11-20 14:25:45 1273

原创 Ural 1309 Dispute (递推)

题意: 给你一个数列: f(0) = 0 f(n) = g(n,f(n-1)) g(x,y) = ((y-1)*x^5+x^3-xy+3x+7y)%9973 让你求f(n)  n 思路: 令m = 9973 容易观察g(x,y) = g(x%m,y) f(x+m) = g( (x+m) %m , f(x+m-1))........ 可以得到 f(x+m) = (A*f

2014-11-09 19:27:58 1238

原创 UVa 12683 Odd and Even Zeroes(数论+数位DP)

UVa 12683 Odd and Even Zeroes(数论+数位DP)

2014-10-19 17:37:42 1421

原创 UVa 12716 GCD XOR (简单证明)

题意: 问 gcd(i,j) = i ^ j  的对数(j 思路:容易想到  形如  (2,3) (4,5).....这种互质相邻且二进制位数相同的数一定满足要求。 那么对于gcd为2情况进行分析: 从gcd(a,b) = 2得到a/2,b/2互质,可以想到a/2与b/2相差只能是1,因为要使a^b = 2 a,b只有在第1位有差别,即差别为2,如果a/2与b/2相差超过1,那么a,b就不

2014-10-15 14:19:28 1374

原创 UVa 12715 Watching the Kangaroo(二分)

UVa 12715 Watching the Kangaroo(二分)

2014-10-14 12:29:22 1252

原创 UVa 12587 Reduce the Maintenance Cost(Tarjan + 二分 + DFS)

题意:n个城市(n 思路:首先边的费用可以通过Tarjan求桥之后求得(利用桥的性质),然后就是二分答案了!对于每个点,如果有个儿子不能维护,那么不可行,否则,试着让儿子去维护边权,如果不可行,只能让父亲承担。 #include #include #include #include #include #include #include #include #include u

2014-10-12 12:30:43 911

原创 UVa 12585 Poker End Games

题意:Alice和Bob这对狗男女又开始玩游戏了!!!!一开始前者有a元,后者有b元,每次玩,每个人赢得概率是对半开的,令c为a,b中的最小值,那么每次玩,谁输了就给赢的人c元,问Alice赢的概率和游戏的盘数期望值! 思路:貌似会迭代!公式也不好推。。。发现概率是0.5  然后误差范围是1e-5, 那么只要到达一定深度以后概率就可以忽略不计了! #include #include

2014-10-11 12:30:30 956

原创 UVa 12589 Learning Vector

题意:有n个向量(0 思路:先确定一点,对于选出的k个向量,按斜率从大到小的顺序摆放,面积最大。(不然会损失几个平行四边形的面积) 然后DP , DP[id][cur][height] 分别表示前id个向量,已经选出了cur个向量,高度为height的最大面积。面积计算公式为  x0*y0 + 2*x1*y0+x1*y1 + 2*x2*(y0+y1)........用记忆化搜索注意初始化的优化

2014-10-11 12:23:31 1174

原创 HDU 5047 Sawtooth(有趣的思维题+证明)

Sawtooth Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 979    Accepted Submission(s): 375 Problem Description Think about a plane

2014-09-29 13:41:22 1373

原创 HDU 5033 Building(类凸包+向量叉积的应用)

HDU 5033 类凸包

2014-09-24 15:54:58 920

原创 HDU 5017 Ellipsoid(模拟退火)

Ellipsoid Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1015    Accepted Submission(s): 359 Special Judge Problem Description Give

2014-09-23 15:12:34 886

原创 HDU 5027 Help!(三分+圆与线段的交点)

Help! Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 180    Accepted Submission(s): 32 Problem Description “Help! Help!” While

2014-09-23 14:12:18 1400

原创 SGU 120 Archipelago (简单几何)

120. Archipelago time limit per test: 0.25 sec.  memory limit per test: 4096 KB Archipelago Ber-Islands consists of N islands that are vertices of equiangular and equilateral N-gon. Islands are

2014-09-17 15:17:09 826

原创 SPOJ 417 The lazy programmer(贪心)

417. The lazy programmer Problem code: LAZYPROG A new web-design studio, called SMART (Simply Masters of ART), employs two people. The first one is a web-designer and an executive

2014-09-16 15:07:25 1287

原创 HDU 4286 Data Handler (双端队列)

Data Handler Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2455    Accepted Submission(s): 616 Problem Description   You are in

2014-09-12 21:47:49 813

原创 SGU 271 Book Pile(双端队列)

271. Book Pile time limit per test: 0.25 sec. memory limit per test: 65536 KB input: standard output: standard There is a pile of N books on the table. Two types of operations are p

2014-09-12 17:37:13 1241

原创 POJ2103 Jackpot(容斥+高精度)

Jackpot Time Limit: 20000MS   Memory Limit: 64000K Total Submissions: 1044   Accepted: 216 Case Time Limit: 2000MS Description The Great Dodgers company has recently

2014-09-04 10:53:32 1231 1

原创 HDU4064 Carcassonne(状态压缩DP)

HDU4064 Carcassonne(状态压缩DP)

2014-09-03 18:34:34 997

原创 HDU4288-Coder(线段树+离线+离散化)

Coder Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3183    Accepted Submission(s): 1254 Problem Description   In mathematics a

2014-09-03 13:19:22 974

原创 POJ2185-Milking Grid(KMP,next数组的应用)

Milking Grid Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 6317   Accepted: 2648 Description Every morning when they are milked, the Farmer John's cows for

2014-09-01 18:39:57 765

原创 UVa1635 - Irrelevant Elements(质因数分解)

Young cryptoanalyst Georgie is investigating different schemes of generating random integer numbers ranging from 0 to m - 1. He thinks that standard random number generators are not good enough, s

2014-08-29 20:46:22 1760

原创 LA3700 Interesting Yang Hui Triangle(Lucas定理)

Harry is a Junior middle student. He is very interested in the story told by his mathematics teacher about the Yang Hui triangle in the class yesterday. After class he wrote the following numbers to s

2014-08-29 14:18:12 1815

原创 HDU4746 Mophues(莫比乌斯反演)

Mophues Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 327670/327670 K (Java/Others) Total Submission(s): 647    Accepted Submission(s): 263 Problem Description As we know, any po

2014-08-27 19:48:04 1413

原创 HDU4372-Count the Buildings(第一类Stirling数+组合计数)

Count the Buildings Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 528    Accepted Submission(s): 171 Problem Description There ar

2014-08-25 22:17:29 1418

原创 HDU3723-Delta Wave(Catalan数+组合计数)

Delta Wave Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 741    Accepted Submission(s): 243 Problem Description A delta wave is a

2014-08-25 19:08:28 926

原创 UVa10325 - The Lottery(容斥+最小公倍数)

The Lottery  The Sports Association of Bangladesh is in great problem with their latest lottery 'Jodi laiga Jai'. There are so many participants this time that they cannot manage all the nu

2014-08-25 16:57:31 836

原创 HDU3240-Counting Binary Trees(Catalan数+求逆元(非互质))

Counting Binary Trees Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 564    Accepted Submission(s): 184 Problem Description There

2014-08-25 15:41:18 1690

原创 POJ3525-Most Distant Point from the Sea(二分+半平面交)

Most Distant Point from the Sea Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 3955   Accepted: 1847   Special Judge Description The main land of Japan ca

2014-08-20 21:06:23 1052

原创 POJ1584-A Round Peg in a Ground Hole(凸包,判圆在凸包内)

A Round Peg in a Ground Hole Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 5301   Accepted: 1662 Description The DIY Furniture company specializes in assem

2014-08-20 21:01:00 1005

原创 POJ1408-Fishnet(线段求交)

Fishnet Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 1788   Accepted: 1144 Description A fisherman named Etadokah awoke in a very small island. He could s

2014-08-20 20:54:02 923

原创 POJ1228-Grandpa's Estate(凸包)

Grandpa's Estate Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 10851   Accepted: 2953 Description Being the only living descendant of his grandfather, Kamr

2014-08-20 20:52:59 1229

原创 POJ2540-Hotter Colder(半平面交)

Hotter Colder Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2523   Accepted: 1045 Description The children's game Hotter Colder is played as follows. Playe

2014-08-20 20:35:44 1355

原创 HDU4719-Oh My Holy FFF(DP线段树优化)

Oh My Holy FFF Time Limit: 5000/2500 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 606    Accepted Submission(s): 141 Problem Description N soldiers fr

2014-08-19 21:04:02 1363

原创 HDU4038-Stone(思维题)

Stone Time Limit: 3000/2000 MS (Java/Others)    Memory Limit: 65768/65768 K (Java/Others) Total Submission(s): 2267    Accepted Submission(s): 568 Problem Description Given an array of int

2014-08-18 17:48:23 818

原创 URAL1306-Sequence Median(优先队列)

1306. Sequence Median Time limit: 1.0 second Memory limit: 1 MB Language limit: C, C++, Pascal Given a sequence of N nonnegative integers. Let's define the median of such sequence. If N is

2014-08-15 20:30:51 989

原创 HDU4509-湫湫系列故事——减肥记II(线段树)

湫湫系列故事——减肥记II Time Limit: 5000/2000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 2395    Accepted Submission(s): 1018 Problem Description   虽然制定了减肥食谱,

2014-08-15 18:34:36 687

原创 ZOJ2507-Let's play a game(Anti-Nim)

Let's play a game Time Limit: 2 Seconds      Memory Limit: 65536 KB Elves from the Lothvain forest have created a very interesting game. The rules are very simple: There are two players.

2014-08-15 16:37:30 939

原创 HDU4289-Control(最小割定理)

Control Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1606    Accepted Submission(s): 705 Problem Description   You, the head of

2014-08-15 14:54:24 635

原创 POJ2762-Going from u to v or from v to u?(Tarjan缩点,DAG判直链)

Going from u to v or from v to u? Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 14474   Accepted: 3804 Description In order to make their sons brave, Jiaji

2014-08-15 13:37:09 623

原创 HDU4902-Nice boat(线段树)

Nice boat Time Limit: 30000/15000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 1455    Accepted Submission(s): 645 Problem Description There is an o

2014-08-14 17:11:22 796

空空如也

空空如也

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

TA关注的人

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