- 博客(38)
- 收藏
- 关注
原创 HDU 6208 The Dominator of Strings
The Dominator of StringsProblem DescriptionHere you have a set of strings. A dominator is a string of the set dominating all strings else. The string S is dominated by T if S is a substrin
2017-09-18 11:38:28 565
原创 POJ 1639 Picnic Planning(度限制最小生成树)
Picnic PlanningTime Limit: 5000MS Memory Limit: 10000KTotal Submissions: 10828 Accepted: 3915DescriptionThe Contortion Brothers are a famous set of circus clowns,
2017-09-03 16:15:49 399
原创 HDU 3072 Intelligence System(Tarjan+最小树形图)
Intelligence SystemProblem DescriptionAfter a day, ALPCs finally complete their ultimate intelligence system, the purpose of it is of course for ACM ... ... Now, kzc_tc, the head of the Inte
2017-09-01 14:41:30 410
原创 HDU 6166 Senior Pan(SPFA+二进制分组)
Senior PanProblem DescriptionSenior Pan fails in his discrete math exam again. So he asks Master ZKC to give him graph theory problems everyday.The task is simple : ZKC will give Pan a dir
2017-08-23 10:45:03 568
原创 POJ 2752 Seek the Name, Seek the Fame
Seek the Name, Seek the FameTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 20508 Accepted: 10679DescriptionThe little cat is so famous, that many coupl
2017-08-21 19:57:38 281
原创 HDU 6153 A Secret(KMP)
A SecretProblem DescriptionToday is the birthday of SF,so VS gives two strings S1,S2 to SF as a present,which have a big secret.SF is interested in this secret and ask VS how to get it.There
2017-08-21 11:52:25 332
转载 字符串匹配算法-KMP
转载地址:KMP 算法(1):如何理解 KMP http://www.61mon.com/index.php/archives/183/转载地址:KMP 算法(2):其细微之处 http://www.61mon.com/index.php/archives/192/欢迎大家去原网址阅读,这里避免以后找不到,先转载。MP 算法(1):如何理解 KMP
2017-08-19 21:23:46 385
原创 HDU 6141 ( I am your Father! ) (最小树形图+权值编码)
I am your Father!Problem Description> Darth Vader: "Obi-Wan never told you what happened to your father.">> Luke Skywalker: "He told me enough! He told me you killed him!">> Darth Vade
2017-08-18 17:16:56 1408 2
原创 POJ 2299(树状数组求逆序对)
Ultra-QuickSortTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 62722 Accepted: 23367DescriptionIn this problem, you have to analyze a particular sorting
2017-08-14 18:55:35 408
原创 HDU 1729 Stone Game(SG函数)
Stone GameProblem DescriptionThis game is a two-player game and is played as follows:1. There are n boxes; each box has its size. The box can hold up to s stones if the size is s.2. At t
2017-08-11 13:32:44 372
原创 HDU 1847 Good Luck in CET-4 Everybody!
Good Luck in CET-4 Everybody!Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10526 Accepted Submission(s): 6816Problem Descriptio
2017-08-10 09:25:39 364
原创 HDU 1848 Fibonacci again and again
Fibonacci again and againProblem Description任何一个大学生对菲波那契数列(Fibonacci numbers)应该都不会陌生,它是这样定义的:F(1)=1;F(2)=2;F(n)=F(n-1)+F(n-2)(n>=3);所以,1,2,3,5,8,13……就是菲波那契数列。在HDOJ上有不少相关的题目,比如1005
2017-08-09 18:32:49 275
转载 ACM_博弈入门
一、威佐夫博弈:POJ 1067(威佐夫博弈)威佐夫博弈(Wythoff Game):有两堆各若干个物品,两个人轮流从某一堆或同时从两堆中取同样多的物品,规定每次至少取一个,多者不限,最后取光者得胜。威佐夫博弈(Wythoff Game):有两堆各若干个物品,两个人轮流从某一堆或同时从两堆中取同样多的物品,规定每次至少取一个,多者不限,最后取光者得胜。这种情况下
2017-08-09 16:30:03 423
原创 HDU 3641 Treasure Hunting
Treasure HuntingProblem DescriptionZstu_yhr is a very curious person who fell in love with math when he was in elementary school phase. When he entered the middle school, he learned Multiplica
2017-08-09 10:42:44 317
原创 HDU 3062 Party
PartyProblem Description有n对夫妻被邀请参加一个聚会,因为场地的问题,每对夫妻中只有1人可以列席。在2n 个人中,某些人之间有着很大的矛盾(当然夫妻之间是没有矛盾的),有矛盾的2个人是不会同时出现在聚会上的。有没有可能会有n 个人同时列席? Inputn: 表示有n对夫妻被邀请 (nm: 表示有m 对矛盾关系 ( m
2017-08-08 23:11:17 391
原创 POJ 1679 The Unique MST(次小生成树)
The Unique MSTTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 31405 Accepted: 11318DescriptionGiven a connected undirected graph, tell if its minimum sp
2017-08-08 20:16:09 282
原创 POJ 3255(次短路+SPFA)
RoadblocksTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 15411 Accepted: 5427DescriptionBessie has moved to a small farm and sometimes enjoys returning
2017-08-08 09:29:29 409
原创 ZOJ 3475 The Great Wall I
The Great Wall ITime Limit: 2 Seconds Memory Limit: 65536 KBLong long ago, in the forgotten land, there is a rich country named X. There were several countries in the forgotten land and s
2017-08-07 19:25:36 483
原创 2017"百度之星"程序设计大赛 - 资格赛 HDU 6083 度度熊的午饭时光
度度熊的午饭时光Problem Description度度熊最期待每天的午饭时光,因为早饭菜品清淡,晚饭减肥不敢吃太多(胖纸的忧伤T.T)。百度食堂的午餐超级丰富,祖国各大菜系应有尽有,度度熊在每个窗口都有爱吃的菜品,而且他还为喜爱的菜品打了分,吃货的情怀呀(>.但是,好吃的饭菜总是很贵,每天的午饭预算有限,请帮度度熊算一算,怎样打饭才能买到的最好吃的饭菜?(不超过
2017-08-07 10:26:45 477
原创 HDU 6071 Lazy Running(同余最短路)
Lazy RunningProblem DescriptionIn HDU, you have to run along the campus for 24 times, or you will fail in PE. According to the rule, you must keep your speed, and your running distance should
2017-08-06 08:38:12 468
原创 HDU 6073 Matching In Multiplication
Matching In MultiplicationProblem DescriptionIn the mathematical discipline of graph theory, a bipartite graph is a graph whose vertices can be divided into two disjoint sets U and V (that i
2017-08-04 15:47:57 826
原创 HDU 6064 RXD and numbers BEST theorem
RXD and numbersProblem DescriptionRXD has a sequence A1,A2,A3,…An, which possesses the following properties:- 1≤Ai≤m- A1=An=1- for all 1≤x≤m, there is at least one position p where A
2017-08-02 20:21:56 817 2
原创 HDU 6060 RXD and dividing
RXD and dividingTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 441 Accepted Submission(s): 179Problem DescriptionRXD has a
2017-08-01 21:19:18 928
原创 To Add or Not to Add CodeForces - 231C
C. To Add or Not to Addtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA piece of paper contains an array
2017-07-14 11:44:01 506
原创 网络流最大流EK和Dinic入门算法
网络流基础入门,这里不说那些证明过程了,直接个人见解。首先:最大流,顾名思义,是从源点出发,经过若干条路径,最后到达汇点的所有流的和。而这里最大流的确定条件是,当前的网络中不存在增广路了。那什么是增广路呢?就是当进行若干次操作后,当前网络还存在使最大流更大的路径,那么就是增广路了。如果当前网络不存在增广路的话,那么我们就无法再增加最大流了,那也就是最大流已经求解出来了。在求最大流的过程中,我们
2017-07-09 19:44:56 2030
原创 计算几何之叉乘和极角排序
迫于队伍需要,蒻最近几天一直在刷计算几何的入门,做了两天,10道题,对叉乘的使用有了一定的了解,当初为了叉乘的知识点,可是找了很多的资料,但一直没有自己满意的,现在有点总结,希望各位菊苣能够给予指点。首先,向量的两种运算,叉乘和点乘,例如向量A(X1,Y1),B(X2,Y2);叉乘:A×B=(X1*Y2)-(X2*Y1)=|A|*|B|*conθ点乘:A*B=(X1*X2)+(Y1*Y
2017-07-03 20:50:38 3590 2
转载 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-07-03 13:03:25 342
转载 欧几里德与扩展欧几里德算法
原创网址为: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
2017-07-03 12:39:34 325
转载 欧拉函数
原创网址:http://www.cnblogs.com/handsomecui/p/4755455.html欧拉函数 算法总结 一欧拉函数(Euler's totient function)欧拉函数的定义: 在数论中,对于正整数N,少于或等于N ([1,N]),且与N互质的正整
2017-07-03 12:36:37 263
原创 POJ_2488: A Knight's Journey
POJ_2488: A Knight's JourneyDescriptionBackgroundThe knight is getting bored of seeing the same black and white squares again and again and has decided to make a journeyaround the world.
2017-07-03 12:35:35 294
原创 HDU 2553 N皇后问题
N皇后问题Problem Description在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。你的任务是,对于给定的N,求出有多少种合法的放置方法。Input共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。O
2017-07-03 12:34:32 321
原创 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,
2017-07-03 12:33:45 513
原创 hdu 1728 逃离迷宫
逃离迷宫Problem Description 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,gloria是个没什么方向感的人
2017-07-03 12:32:34 544
原创 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
2017-07-03 12:31:51 294
原创 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 fee
2017-07-03 12:30:35 213
原创 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 button
2017-07-03 12:28:38 306
原创 POJ 2823 Sliding Window
Sliding WindowTime Limit: 12000MS Memory Limit: 65536KTotal Submissions: 53791 Accepted: 15431Case Time Limit: 5000MSDescriptionAn array of size n ≤ 106 i
2017-07-03 12:27:14 313
原创 POJ_2082_Terrible Sets
Terrible SetsTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 4374 Accepted: 2269DescriptionLet N be the set of all natural numbers {0 , 1 , 2 , . . .
2017-07-03 12:26:06 292
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人