08 2013 档案

HDU 3726 Graph and Queries (离线处理+splay tree)
摘要:Graph and QueriesTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1467Accepted Submission(s): 301Problem DescriptionYou are given an undirected graph with N vertexes and M edges. Every vertex in this graph has an integer value assigned to it at the 阅读全文

posted @ 2013-08-30 19:31 kuangbin 阅读(1680) 评论(0) 推荐(0)

POJ 3580 SuperMemo (splay tree)
摘要:SuperMemoTime Limit:5000MSMemory Limit:65536KTotal Submissions:6841Accepted:2268Case Time Limit:2000MSDescriptionYour friend, Jackson is invited to a TV show called SuperMemo in which the participant is told to play a memorizing game. At first, the host tells the participant a sequence of numbers, { 阅读全文

posted @ 2013-08-28 21:30 kuangbin 阅读(995) 评论(0) 推荐(0)

BZOJ 1500: [NOI2005]维修数列 (splay tree)
摘要:1500: [NOI2005]维修数列Time Limit:10 SecMemory Limit:64 MBSubmit:4229Solved:1283[Submit][Status]DescriptionInput输入文件的第1行包含两个数N和M,N表示初始时数列中数的个数,M表示要进行的操作数目。第2行包含N个数字,描述初始时的数列。以下M行,每行一条命令,格式参见问题描述中的表格。Output对于输入数据中的GET-SUM和MAX-SUM操作,向输出文件依次打印结果,每个答案(数字)占一行。Sample Input9 82 -6 3 5 1 -5 -3 6 3GET-SUM 5 4MAX 阅读全文

posted @ 2013-08-28 19:18 kuangbin 阅读(3406) 评论(0) 推荐(0)

BZOJ 1269: [AHOI2006]文本编辑器editor (splay tree)
摘要:1269: [AHOI2006]文本编辑器editorTime Limit:10 SecMemory Limit:162 MBSubmit:1213Solved:454[Submit][Status]Description这些日子,可可不和卡卡一起玩了,原来可可正废寝忘食的想做一个简单而高效的文本编辑器。你能帮助他吗?为了明确任务目标,可可对“文本编辑器”做了一个抽象的定义:文本:由0个或多个字符构成的序列。这些字符的ASCII码在闭区间[32, 126]内,也就是说,这些字符均为可见字符或空格。光标:在一段文本中用于指示位置的标记,可以位于文本的第一个字符之前,文本的最后一个字符之后或文本的 阅读全文

posted @ 2013-08-27 03:05 kuangbin 阅读(1585) 评论(0) 推荐(0)

HDU 3487 Play with Chain (splay tree)
摘要:Play with ChainTime Limit: 6000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2783Accepted Submission(s): 1141Problem DescriptionYaoYao is fond of playing his chains. He has a chain containing n diamonds on it. Diamonds are numbered from 1 to n.At first, the diam 阅读全文

posted @ 2013-08-26 22:34 kuangbin 阅读(1045) 评论(0) 推荐(1)

HDU 3436 Queue-jumpers (splay tree)
摘要:Queue-jumpersTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1821Accepted Submission(s): 425Problem DescriptionPonyo and Garfield are waiting outside the box-office for their favorite movie. Because queuing is so boring, that they want to play a ga 阅读全文

posted @ 2013-08-25 22:23 kuangbin 阅读(814) 评论(0) 推荐(0)

HDU 1890 Robotic Sort (splay tree)
摘要:Robotic SortTime Limit: 6000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1640Accepted Submission(s): 711Problem DescriptionSomewhere deep in the Czech Technical University buildings, there are laboratories for examining mechanical and electrical properties of v 阅读全文

posted @ 2013-08-25 11:07 kuangbin 阅读(1767) 评论(0) 推荐(0)

POJ 3468 A Simple Problem with Integers (splay tree入门)
摘要:A Simple Problem with IntegersTime Limit:5000MSMemory Limit:131072KTotal Submissions:47944Accepted:14122Case Time Limit:2000MSDescriptionYou haveNintegers,A1,A2, ... ,AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interv 阅读全文

posted @ 2013-08-24 23:16 kuangbin 阅读(1325) 评论(0) 推荐(0)

1588: [HNOI2002]营业额统计 (splay tree)
摘要:1588: [HNOI2002]营业额统计Time Limit:5 SecMemory Limit:162 MBSubmit:5783Solved:1859[Submit][Status]Description营业额统计 Tiger最近被公司升任为营业部经理,他上任后接受公司交给的第一项任务便是统计并分析公司成立以来的营业情况。 Tiger拿出了公司的账本,账本上记录了公司成立以来每天的营业额。分析营业情况是一项相当复杂的工作。由于节假日,大减价或者是其他情况的时候,营业额会出现一定的波动,当然一定的波动是能够接受的,但是在某些时候营业额突变得很高或是很低,这就证明公司此时的经营状况出现了问题 阅读全文

posted @ 2013-08-24 22:08 kuangbin 阅读(831) 评论(0) 推荐(0)

HDU 4597 Play Game (DP,记忆化搜索)
摘要:Play GameTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 24Accepted Submission(s): 18Problem DescriptionAlice and Bob are playing a game. There are two piles of cards. There are N cards in each pile, and each card has a score. They take turns to pi 阅读全文

posted @ 2013-08-24 18:41 kuangbin 阅读(1765) 评论(0) 推荐(0)

HDU 4499 Cannon (搜索)
摘要:CannonTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 21Accepted Submission(s): 14Problem DescriptionIn Chinese Chess, there is one kind of powerful chessmen called Cannon. It can move horizontally or vertically along the chess grid. At each move, 阅读全文

posted @ 2013-08-24 18:39 kuangbin 阅读(882) 评论(0) 推荐(0)

HDU 4497 GCD and LCM (合数分解)
摘要:GCD and LCMTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 40Accepted Submission(s): 22Problem DescriptionGiven two positive integers G and L, could you tell me how many solutions of (x, y, z) there are, satisfying that gcd(x, y, z) = G and lcm(x, 阅读全文

posted @ 2013-08-24 18:37 kuangbin 阅读(2279) 评论(3) 推荐(0)

HDU 4496 D-City (并查集,水题)
摘要:D-CityTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 18Accepted Submission(s): 15Problem DescriptionLuxer is a really bad guy. He destroys everything he met.One day Luxer went to D-city. D-city has N D-points and M D-lines. Each D-line connects ex 阅读全文

posted @ 2013-08-24 18:31 kuangbin 阅读(1205) 评论(0) 推荐(1)

HDU 4493 Tutor (水题)
摘要:TutorTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 47Accepted Submission(s): 26Problem DescriptionLilin was a student of Tonghua Normal University. She is studying at University of Chicago now. Besides studying, she worked as a tutor teaching Chi 阅读全文

posted @ 2013-08-24 18:30 kuangbin 阅读(1022) 评论(1) 推荐(0)

HDU 4498 Function Curve (分段,算曲线积分)
摘要:Function CurveTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 31Accepted Submission(s): 10Problem DescriptionGiven sequences of k1, k2, … kn, a1, a2, …, anand b1, b2, …, bn. Consider following function:Then we draw F(x) on a xy-plane, the value of 阅读全文

posted @ 2013-08-24 18:29 kuangbin 阅读(733) 评论(4) 推荐(1)

POJ 2417 Discrete Logging (Baby-Step Giant-Step)
摘要:Discrete LoggingTime Limit:5000MSMemory Limit:65536KTotal Submissions:2819Accepted:1386DescriptionGiven a prime P, 2 8 #include 9 #include 10 #include 11 #include 12 #include 13 #include 14 #include 15 #include 16 #include 17 #include 18 #include 19 using namespace std;20 //baby_step giant_step21 .. 阅读全文

posted @ 2013-08-24 00:35 kuangbin 阅读(1646) 评论(0) 推荐(0)

URAL 1099. Work Scheduling (一般图匹配带花树)
摘要:1099. Work SchedulingTime limit: 0.5 secondMemory limit: 64 MBThere is certain amount of night guards that are available to protect the local junkyard from possible junk robberies. These guards need to scheduled in pairs, so that each pair guards at different night. The junkyard CEO ordered you to w 阅读全文

posted @ 2013-08-23 20:41 kuangbin 阅读(1533) 评论(0) 推荐(0)

HDU 4687 Boke and Tsukkomi (一般图匹配带花树)
摘要:Boke and TsukkomiTime Limit: 3000/3000 MS (Java/Others)Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 336Accepted Submission(s): 116Problem DescriptionA new season of Touhou M-1 Grand Prix is approaching. Girls in Gensokyo cannot wait for participating it. Before the registration, t 阅读全文

posted @ 2013-08-23 20:40 kuangbin 阅读(1671) 评论(0) 推荐(0)

HDU 4705 Y (2013多校10,1010题,简单树形DP)
摘要:YTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 60Accepted Submission(s): 20Problem DescriptionSample Input41 21 31 4Sample Output1Hint1. The only set is {2,3,4}.2. Please use #pragma comment(linker, "/STACK:16777216")Source2013 Multi- 阅读全文

posted @ 2013-08-22 18:24 kuangbin 阅读(853) 评论(0) 推荐(0)

HDU 4704 Sum (2013多校10,1009题)
摘要:SumTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 94Accepted Submission(s): 41Problem DescriptionSample Input2Sample Output2Hint1. For N = 2, S(1) = S(2) = 1.2. The input file consists of multiple test cases. Source2013 Multi-University Traini.. 阅读全文

posted @ 2013-08-22 18:22 kuangbin 阅读(468) 评论(0) 推荐(0)

HDU 4699 Editor (2013多校10,1004题)
摘要:EditorTime Limit: 3000/2000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 118Accepted Submission(s): 38Problem DescriptionSample Input8I 2I -1I 1Q 3LDRQ 2Sample Output23HintThe following diagram shows the status of sequence after each instruction:Source2013 Multi-Un 阅读全文

posted @ 2013-08-22 18:21 kuangbin 阅读(645) 评论(0) 推荐(0)

HDU 4696 Answers (2013多校10,1001题 )
摘要:AnswersTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 25Accepted Submission(s): 16Problem DescriptionSample Input2 42 22 10 1 2 3Sample OutputNOYESYESYESSource2013 Multi-University Training Contest 10Recommendzhuyuanchen520分容易发现规律。如果M 8 #include 阅读全文

posted @ 2013-08-22 18:19 kuangbin 阅读(412) 评论(0) 推荐(0)

SPOJ 7001. Visible Lattice Points (莫比乌斯反演)
摘要:7001. Visible Lattice PointsProblem code: VLATTICEConsider a N*N*N lattice. One corner is at (0,0,0) and the opposite one is at (N,N,N). How many lattice points are visible from corner at (0,0,0) ? A point X is visible from point Y iff no other lattice point lies on the segment joining X and Y.Input 阅读全文

posted @ 2013-08-21 21:14 kuangbin 阅读(1687) 评论(2) 推荐(0)

BZOJ 2301: [HAOI2011]Problem b (莫比乌斯反演)
摘要:2301: [HAOI2011]Problem bTime Limit:50 SecMemory Limit:256 MBSubmit:436Solved:187[Submit][Status]Description对于给出的n个询问,每次求有多少个数对(x,y),满足a≤x≤b,c≤y≤d,且gcd(x,y) = k,gcd(x,y)函数为x和y的最大公约数。Input第一行一个整数n,接下来n行每行五个整数,分别表示a、b、c、d、kOutput共n行,每行一个整数表示满足要求的数对(x,y)的个数Sample Input22 5 1 5 11 5 1 5 2 Sample Output1 阅读全文

posted @ 2013-08-21 21:12 kuangbin 阅读(4653) 评论(0) 推荐(0)

HDU 1695 GCD (莫比乌斯反演)
摘要:GCDTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4291Accepted Submission(s): 1502Problem DescriptionGiven 5 integers: a, b, c, d, k, you're to find x in a...b, y in c...d that GCD(x, y) = k. GCD(x, y) means the greatest common divisor of x an 阅读全文

posted @ 2013-08-21 21:10 kuangbin 阅读(8278) 评论(0) 推荐(2)

HDU 4691 Front compression (2013多校9 1006题 后缀数组)
摘要:Front compressionTime Limit: 5000/5000 MS (Java/Others)Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 158Accepted Submission(s): 63Problem DescriptionFront compression is a type of delta encoding compression algorithm whereby common prefixes and their lengths are recorded so that th 阅读全文

posted @ 2013-08-20 19:32 kuangbin 阅读(1800) 评论(0) 推荐(0)

HDU 4690 EBCDIC (2013多校 1005题 胡搞题)
摘要:EBCDICTime Limit: 2000/2000 MS (Java/Others)Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 160Accepted Submission(s): 81Problem DescriptionA mad scientist found an ancient message from an obsolete IBN System/360 mainframe. He believes that this message contains some very important s 阅读全文

posted @ 2013-08-20 19:31 kuangbin 阅读(957) 评论(0) 推荐(0)

HDU 4686 Arc of Dream (2013多校9 1001 题,矩阵)
摘要:Arc of DreamTime Limit: 2000/2000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 0Accepted Submission(s): 0Problem DescriptionAn Arc of Dream is a curve defined by following function:wherea0 = A0ai = ai-1*AX+AYb0 = B0bi = bi-1*BX+BYWhat is the value of AoD(N) modulo 1, 阅读全文

posted @ 2013-08-20 19:28 kuangbin 阅读(1447) 评论(1) 推荐(1)

HDU 1695 GCD (欧拉函数+容斥原理)
摘要:GCDTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4272Accepted Submission(s): 1492Problem DescriptionGiven 5 integers: a, b, c, d, k, you're to find x in a...b, y in c...d that GCD(x, y) = k. GCD(x, y) means the greatest common divisor of x an 阅读全文

posted @ 2013-08-19 23:25 kuangbin 阅读(2853) 评论(0) 推荐(0)

【转】[专题学习][计算几何]
摘要:原文地址:http://www.cnblogs.com/ch3656468/archive/2011/03/02/1969303.html基本的叉积、点积和凸包等东西就不多说什么了,网上一搜一大堆,切一些题目基本熟悉了就差不多了。 一些基本的题目可以自己搜索,比如这个blog:http://blog.sina.com.cn/s/blog_49c5866c0100f3om.html 接下来,研究了半平面交,思想方法看07年朱泽园的国家队论文,模板代码参考自我校大牛韬哥:http://www.owent.net/2010/10/acm-%E8%AE%A1%E7%AE%97%E5%87%A0%E.. 阅读全文

posted @ 2013-08-19 12:42 kuangbin 阅读(3089) 评论(0) 推荐(3)

POJ 1755 Triathlon (半平面交)
摘要:TriathlonTime Limit:1000MSMemory Limit:10000KTotal Submissions:4733Accepted:1166DescriptionTriathlon is an athletic contest consisting of three consecutive sections that should be completed as fast as possible as a whole. The first section is swimming, the second section is riding bicycle and the th 阅读全文

posted @ 2013-08-19 00:37 kuangbin 阅读(1554) 评论(0) 推荐(0)

POJ 3384 Feng Shui (半平面交)
摘要:Feng ShuiTime Limit:2000MSMemory Limit:65536KTotal Submissions:3743Accepted:1150Special JudgeDescriptionFeng shui is the ancient Chinese practice of placement and arrangement of space to achieve harmony with the environment. George has recently got interested in it, and now wants to apply it to his 阅读全文

posted @ 2013-08-18 16:19 kuangbin 阅读(1240) 评论(0) 推荐(0)

POJ 3525 Most Distant Point from the Sea (半平面交+二分)
摘要:Most Distant Point from the SeaTime Limit:5000MSMemory Limit:65536KTotal Submissions:3476Accepted:1596Special JudgeDescriptionThe main land of Japan called Honshu is an island surrounded by the sea. In such an island, it is natural to ask a question: “Where is the most distant point from the sea?” T 阅读全文

posted @ 2013-08-18 15:37 kuangbin 阅读(852) 评论(0) 推荐(0)

POJ 1222 POJ 1830 POJ 1681 POJ 1753 POJ 3185 高斯消元求解一类开关问题
摘要:http://poj.org/problem?id=1222http://poj.org/problem?id=1830http://poj.org/problem?id=1681http://poj.org/problem?id=1753http://poj.org/problem?id=3185这几个题目都类似,都可以使用高斯消元来求解一个模2的01方程组来解决。有时候需要枚举自由变元,有的是判断存不存在解POJ 1222EXTENDED LIGHTS OUT普通的问题。肯定有唯一解。肯定枚举第一行去做,也可以使用高斯消元。 1 /* **************************. 阅读全文

posted @ 2013-08-17 22:12 kuangbin 阅读(3051) 评论(0) 推荐(1)

POJ 3237 Tree (树链剖分)
摘要:TreeTime Limit:5000MSMemory Limit:131072KTotal Submissions:2825Accepted:769DescriptionYou are given a tree withNnodes. The tree’s nodes are numbered 1 throughNand its edges are numbered 1 throughN− 1. Each edge is associated with a weight. Then you are to execute a series of instructions on the tree 阅读全文

posted @ 2013-08-17 07:30 kuangbin 阅读(4904) 评论(0) 推荐(2)

2038: [2009国家集训队]小Z的袜子(hose) (莫队算法)
摘要:题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=2038专题练习:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=29469#overview2038: [2009国家集训队]小Z的袜子(hose)Time Limit:20 SecMemory Limit:259 MBSubmit:966Solved:472[Submit][Status]Description作为一个生活散漫的人,小Z每天早上都要耗费很久从一堆五颜六色的袜子中找出一双来穿。终于有一天,小Z再也无法忍受这恼人的 阅读全文

posted @ 2013-08-16 20:25 kuangbin 阅读(6804) 评论(2) 推荐(0)

HDU 4685 Prince and Princess (2013多校8 1010题 二分匹配+强连通)
摘要:Prince and PrincessTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 150Accepted Submission(s): 46Problem DescriptionThere are n princes and m princesses. Princess can marry any prince. But prince can only marry the princess they DO love.For all prin 阅读全文

posted @ 2013-08-16 00:08 kuangbin 阅读(1645) 评论(0) 推荐(0)

HDU 4678 Mine (2013多校8 1003题 博弈)
摘要:MineTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 51Accepted Submission(s): 6Problem DescriptionHave you ever played a game in Windows: Mine?This game is played on a n*m board, just like the Pic(1)On the board, Under some grids there are mines (r 阅读全文

posted @ 2013-08-15 17:12 kuangbin 阅读(1078) 评论(0) 推荐(0)

HDU 4679 Terrorist’s destroy (2013多校8 1004题 树形DP)
摘要:Terrorist’s destroyTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 24Accepted Submission(s): 6Problem DescriptionThere is a city which is built like a tree.A terrorist wants to destroy the city's roads. But now he is alone, he can only destroy 阅读全文

posted @ 2013-08-15 17:09 kuangbin 阅读(1098) 评论(6) 推荐(1)

HDU 4681 String(2013多校8 1006题 DP)
摘要:StringTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 11Accepted Submission(s): 4Problem DescriptionGiven 3 strings A, B, C, find the longest string D which satisfy the following rules:a) D is the subsequence of Ab) D is the subsequence of Bc) C is 阅读全文

posted @ 2013-08-15 17:06 kuangbin 阅读(782) 评论(0) 推荐(0)

1036: [ZJOI2008]树的统计Count (树链剖分)
摘要:1036: [ZJOI2008]树的统计CountTime Limit:10 SecMemory Limit:162 MBSubmit:3401Solved:1418[Submit][Status]Description一棵树上有n个节点,编号分别为1到n,每个节点都有一个权值w。我们将以下面的形式来要求你对这棵树完成一些操作: I. CHANGE u t : 把结点u的权值改为t II. QMAX u v: 询问从点u到点v的路径上的节点的最大权值 III. QSUM u v: 询问从点u到点v的路径上的节点的权值和 注意:从点u到点v的路径上的节点包括u和v本身Input输入的第一行为一个 阅读全文

posted @ 2013-08-15 10:25 kuangbin 阅读(3103) 评论(0) 推荐(1)

HDU 3966 Aragorn's Story (树链剖分+树状数组)
摘要:Aragorn's StoryTime Limit: 10000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1321Accepted Submission(s): 344Problem DescriptionOur protagonist is the handsome human prince Aragorn comes from The Lord of the Rings. One day Aragorn finds a lot of enemies who 阅读全文

posted @ 2013-08-14 23:55 kuangbin 阅读(2177) 评论(0) 推荐(0)

HDU 4675 GCD of Sequence (2013多校7 1010题 数学题)
摘要:GCD of SequenceTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 46Accepted Submission(s): 14Problem DescriptionAlice is playing a game with Bob.Alice shows N integers a1, a2, …, aN, and M, K. She says each integers 1 ≤ ai≤ M.And now Alice wants to a 阅读全文

posted @ 2013-08-13 20:12 kuangbin 阅读(1345) 评论(2) 推荐(0)

HDU 4671 Backup Plan (2013多校7 1006题 构造)
摘要:Backup PlanTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 93Accepted Submission(s): 36Special JudgeProblem DescriptionMakomuno has N servers and M databases. All databases are synchronized among all servers and each database has a ordered list den 阅读全文

posted @ 2013-08-13 19:36 kuangbin 阅读(637) 评论(0) 推荐(0)

HDU 4669 Mutiples on a circle (2013多校7 1004题)
摘要:Mutiples on a circleTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 171Accepted Submission(s): 28Problem DescriptionTom has a necklace with n jewels. There is a number on each jewel. Now Tom wants to select a wonderful chain from the necklace. A ch 阅读全文

posted @ 2013-08-13 19:22 kuangbin 阅读(757) 评论(0) 推荐(0)

HDU 4667 Building Fence(2013多校7 1002题 计算几何,凸包,圆和三角形)
摘要:Building FenceTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 171Accepted Submission(s): 25Special JudgeProblem DescriptionLong long ago, there is a famous farmer named John. He owns a big farm and many cows. There are two kinds of cows on his farm 阅读全文

posted @ 2013-08-13 19:07 kuangbin 阅读(775) 评论(0) 推荐(0)

HDU 4666 Hyperspace (2013多校7 1001题 最远曼哈顿距离)
摘要:HyperspaceTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 67Accepted Submission(s): 32Problem DescriptionThe great Mr.Smith has invented a hyperspace particle generator. The device is very powerful. The device can generate a hyperspace. In the hy 阅读全文

posted @ 2013-08-13 19:02 kuangbin 阅读(1199) 评论(0) 推荐(0)

HDU 4579 Random Walk (解方程组)
摘要:Random WalkTime Limit: 5000/2000 MS (Java/Others)Memory Limit: 65535/65536 K (Java/Others)Total Submission(s): 81Accepted Submission(s): 35Problem DescriptionYuanfang is walking on a chain. The chain has n nodes numbered from 1 to n. Every second, he can move from node i to node j with probability:c 阅读全文

posted @ 2013-08-12 21:48 kuangbin 阅读(1292) 评论(2) 推荐(0)

SPOJ 375. Query on a tree (树链剖分)
摘要:题目链接:http://www.spoj.com/problems/QTREE/375. Query on a treeProblem code: QTREEYou are given a tree (an acyclic undirected connected graph) withNnodes, and edges numbered 1, 2, 3...N-1.We will ask you to perfrom some instructions of the following form:CHANGE i ti: change the cost of the i-th edge to 阅读全文

posted @ 2013-08-12 19:45 kuangbin 阅读(3619) 评论(2) 推荐(0)

树链剖分学习
摘要:最近一段时间决定先好好搞一下数据结构了,首先搞了下树链剖分;专题训练:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=28982#overview树链剖分并不是一个复杂的算法或者数据结构,只是能把一棵树拆成链来处理而已,换一种说法,树链剖分只是xxx数据结构/算法在树上的推广,或者说,树链剖分只是把树hash到了几段连续的区间上。学习链接:入门:http://blog.sina.com.cn/s/blog_7a1746820100wp67.html (看了这个讲解,再把题目A掉就有点理解了)https://quartergeek.co 阅读全文

posted @ 2013-08-12 19:43 kuangbin 阅读(13256) 评论(0) 推荐(2)

HDU 4577 X-Boxes
摘要:X-BoxesTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 202Accepted Submission(s): 71Problem DescriptionCrazygirl is a crazy fan of XBOX games. Today, she’s here middle in a competition, in which the winner will be rewarded with an opportunity of wo 阅读全文

posted @ 2013-08-11 15:30 kuangbin 阅读(1297) 评论(0) 推荐(0)

HDU 4585 Shaolin(水题,STL)
摘要:ShaolinTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 64Accepted Submission(s): 38Problem DescriptionShaolin temple is very famous for its Kongfu monks.A lot of young men go to Shaolin temple every year, trying to be a monk there. The master of Sh 阅读全文

posted @ 2013-08-10 18:10 kuangbin 阅读(1847) 评论(0) 推荐(0)

HDU 4584 Building bridges (水题)
摘要:Building bridgesTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 45Accepted Submission(s): 39Problem DescriptionHululu and Cululu are two pacific ocean countries made up of many islands. These two country has so many years of friendship so they deci 阅读全文

posted @ 2013-08-10 18:09 kuangbin 阅读(1235) 评论(0) 推荐(0)

HDU 4578 Transformation (线段树)
摘要:TransformationTime Limit: 15000/8000 MS (Java/Others)Memory Limit: 65535/65536 K (Java/Others)Total Submission(s): 49Accepted Submission(s): 16Problem DescriptionYuanfang is puzzled with the question below:There are n integers, a1, a2, …, an. The initial values of them are 0. There are four kinds of 阅读全文

posted @ 2013-08-10 18:08 kuangbin 阅读(3346) 评论(0) 推荐(0)

HDU 4576 Robot (很水的概率题)
摘要:RobotTime Limit: 8000/4000 MS (Java/Others)Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 158Accepted Submission(s): 46Problem DescriptionMichael has a telecontrol robot. One day he put the robot on a loop with n cells. The cells are numbered from 1 to n clockwise.At first the robot 阅读全文

posted @ 2013-08-10 18:04 kuangbin 阅读(2107) 评论(2) 推荐(0)

HDU 4658 Integer Partition (2013多校6 1004题)
摘要:Integer PartitionTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 22Accepted Submission(s): 15Problem DescriptionGiven n, k, calculate the number of different (unordered) partitions of n such that no part is repeated k or more times. InputFirst line 阅读全文

posted @ 2013-08-08 19:44 kuangbin 阅读(1531) 评论(1) 推荐(0)

HDU 4665 Unshuffle (2013多校6 1011 )
摘要:UnshuffleTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 148Accepted Submission(s): 43Special JudgeProblem DescriptionA shuffle of two strings is formed by interspersing the characters into a new string, keeping the characters of each string in ord 阅读全文

posted @ 2013-08-08 19:42 kuangbin 阅读(863) 评论(0) 推荐(0)

HDU 4664 Triangulation(2013多校6 1010题,博弈)
摘要:TriangulationTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 96Accepted Submission(s): 29Problem DescriptionThere are n points in a plane, and they form a convex set. No, you are wrong. This is not a computational geometry problem. Carol and Dave a 阅读全文

posted @ 2013-08-08 19:31 kuangbin 阅读(1072) 评论(1) 推荐(0)

HDU 4662 MU Puzzle (2013多校6 1008 水题)
摘要:MU PuzzleTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 134Accepted Submission(s): 71Problem DescriptionSuppose there are the symbols M, I, and U which can be combined to produce strings of symbols called "words". We start with one word 阅读全文

posted @ 2013-08-08 19:23 kuangbin 阅读(797) 评论(0) 推荐(0)

HDU 4655 Cut Pieces(2013多校6 1001题 简单数学题)
摘要:Cut PiecesTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 133Accepted Submission(s): 62Problem DescriptionSuppose we have a sequence of n blocks. Then we paint the blocks. Each block should be painted a single color and block i can have color 1 to 阅读全文

posted @ 2013-08-08 19:15 kuangbin 阅读(940) 评论(1) 推荐(0)

HDU 4643 GSM (2013多校5 1001题 计算几何)
摘要:GSMTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 622Accepted Submission(s): 206Problem DescriptionXiao Ming is traveling around several cities by train. And the time on the train is very boring, so Xiao Ming will use the mobile Internet. We all k 阅读全文

posted @ 2013-08-07 20:07 kuangbin 阅读(583) 评论(0) 推荐(0)

HDU 4622 Reincarnation (查询一段字符串的不同子串个数,后缀自动机)
摘要:ReincarnationTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 843Accepted Submission(s): 283Problem DescriptionNow you are back,and have a task to do:Given you a string s consist of lower-case English letters only,denote f(s) as the number of disti 阅读全文

posted @ 2013-08-06 09:18 kuangbin 阅读(3717) 评论(0) 推荐(0)

POJ 3680 Intervals(费用流)
摘要:IntervalsTime Limit:5000MSMemory Limit:65536KTotal Submissions:5762Accepted:2288DescriptionYou are givenNweighted open intervals. Theith interval covers (ai,bi) and weighswi. Your task is to pick some of the intervals to maximize the total weights under the limit that no point in the real axis is co 阅读全文

posted @ 2013-08-04 11:00 kuangbin 阅读(1237) 评论(0) 推荐(0)

POJ 3422 Kaka's Matrix Travels(费用流)
摘要:Kaka's Matrix TravelsTime Limit:1000MSMemory Limit:65536KTotal Submissions:6792Accepted:2679DescriptionOn anN×Nchessboard with a non-negative number in each grid, Kaka starts his matrix travels withSUM= 0. For each travel, Kaka moves one rook from the left-upper grid to the right-bottom one 阅读全文

posted @ 2013-08-04 10:40 kuangbin 阅读(1173) 评论(0) 推荐(0)

【转】Gvim配置(Windows and Linux)for C++
摘要:转载地址:http://blog.csdn.net/onepiecehuiyu/article/details/8934366http://mawenhao19930620.blog.163.com/blog/static/12857536120112991818242/Windows下gvim配置文件_vimrc首先配置g++到环境变量(配置g++,具体是将devc++的g++.exe的路径比如说:c:/deVC++/bin..加入到环境变量path里面) , 然后将下面的代码复制并保存为_vimrc , 替换掉vim安装文件夹中的_vimrc文件(或者是打开Vim的启动设定,然后复制下面的 阅读全文

posted @ 2013-08-03 14:56 kuangbin 阅读(2517) 评论(0) 推荐(0)

HDU 4634 Swipe Bo (2013多校4 1003 搜索)
摘要:Swipe BoTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 455Accepted Submission(s): 111Problem Description“Swipe Bo” is a puzzle game that requires foresight and skill.The main character of this game is a square blue tofu called Bo. We can swipe up 阅读全文

posted @ 2013-08-03 02:17 kuangbin 阅读(957) 评论(3) 推荐(0)

HDU 4633 Who's Aunt Zhang (2013多校4 1002 polya计数)
摘要:Who's Aunt ZhangTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 19Accepted Submission(s): 16Problem DescriptionAunt Zhang, well known as 张阿姨, is a fan of Rubik’s cube. One day she buys a new one and would like to color it as a gift to send to T 阅读全文

posted @ 2013-08-01 20:29 kuangbin 阅读(776) 评论(1) 推荐(0)

HDU 4632 Palindrome subsequence (2013多校4 1001 DP)
摘要:Palindrome subsequenceTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/65535 K (Java/Others)Total Submission(s): 88Accepted Submission(s): 26Problem DescriptionIn mathematics, a subsequence is a sequence that can be derived from another sequence by deleting some elements without changing t 阅读全文

posted @ 2013-08-01 17:59 kuangbin 阅读(893) 评论(0) 推荐(0)

HDU 4635 Strongly connected (2013多校4 1004 有向图的强连通分量)
摘要:Strongly connectedTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 53Accepted Submission(s): 15Problem DescriptionGive a simple directed graph with N nodes and M edges. Please tell me the maximum number of the edges you can add that the graph is sti 阅读全文

posted @ 2013-08-01 17:56 kuangbin 阅读(989) 评论(0) 推荐(0)

HDU 4638 Group (2013多校4 1007 离线处理+树状数组)
摘要:GroupTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 17Accepted Submission(s): 5Problem DescriptionThere are n men ,every man has an ID(1..n).their ID is unique. Whose ID is i and i-1 are friends, Whose ID is i and i+1 are friends. These n men stan 阅读全文

posted @ 2013-08-01 17:54 kuangbin 阅读(1230) 评论(0) 推荐(0)

HDU 4639 Hehe (2013多校4 1008 水题)
摘要:HeheTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 33Accepted Submission(s): 22Problem DescriptionAs we all know, Fat Brother likes MeiZi every much, he always find some topic to talk with her. But as Fat Brother is so low profile that no one know 阅读全文

posted @ 2013-08-01 17:52 kuangbin 阅读(490) 评论(0) 推荐(0)

HDU 4642 Fliping game (2013多校4 1011 简单博弈)
摘要:Fliping gameTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 46Accepted Submission(s): 35Problem DescriptionAlice and Bob are playing a kind of special game on an N*M board (N rows, M columns). At the beginning, there are N*M coins in this board wit 阅读全文

posted @ 2013-08-01 17:50 kuangbin 阅读(894) 评论(0) 推荐(0)

导航

JAVASCRIPT: