09 2013 档案

HDU 4763 Theme Section (2013长春网络赛1005,KMP)
摘要:Theme SectionTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 271Accepted Submission(s): 121Problem DescriptionIt's time for music! A lot of popular musicians are invited to join us in the music festival. Each of them will play one of their repr 阅读全文

posted @ 2013-09-29 19:00 kuangbin 阅读(1957) 评论(0) 推荐(0)

HDU 4764 Stone (2013长春网络赛,水博弈)
摘要:StoneTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 179Accepted Submission(s): 137Problem DescriptionTang and Jiang are good friends. To decide whose treat it is for dinner, they are playing a game. Specifically, Tang and Jiang will alternatively 阅读全文

posted @ 2013-09-29 17:33 kuangbin 阅读(1450) 评论(0) 推荐(0)

HDU 4762 Cut the Cake (2013长春网络赛1004题,公式题)
摘要:Cut the CakeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 300Accepted Submission(s): 135Problem DescriptionMMM got a big big big cake, and invited all her M friends to eat the cake together. Surprisingly one of her friends HZ took some (N) strawb 阅读全文

posted @ 2013-09-29 17:30 kuangbin 阅读(1700) 评论(0) 推荐(0)

HDU 4759 Poker Shuffle(2013长春网络赛1001题)
摘要:Poker ShuffleTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 95Accepted Submission(s): 24Problem DescriptionJason is not only an ACMer, but also a poker nerd. He is able to do a perfect shuffle. In a perfect shuffle, the deck containing K cards, wh 阅读全文

posted @ 2013-09-29 16:56 kuangbin 阅读(1428) 评论(0) 推荐(0)

HDU 4768 Flyer (2013长春网络赛1010题,二分)
摘要:FlyerTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 386Accepted Submission(s): 127Problem DescriptionThe new semester begins! Different kinds of student societies are all trying to advertise themselves, by giving flyers to the students for introdu 阅读全文

posted @ 2013-09-29 00:00 kuangbin 阅读(1278) 评论(0) 推荐(1)

HDU 4751 Divide Groups (2013南京网络赛1004题,判断二分图)
摘要:Divide GroupsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 423Accepted Submission(s): 161Problem DescriptionThis year is the 60th anniversary of NJUST, and to make the celebration more colorful, Tom200 is going to invite distinguished alumnus bac 阅读全文

posted @ 2013-09-22 12:17 kuangbin 阅读(1323) 评论(0) 推荐(0)

HDU 4750 Count The Pairs (2013南京网络赛1003题,并查集)
摘要:Count The PairsTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 277Accepted Submission(s): 150Problem DescriptionWith the 60th anniversary celebration of Nanjing University of Science and Technology coming soon, the university sets n tourist spots 阅读全文

posted @ 2013-09-22 12:15 kuangbin 阅读(727) 评论(0) 推荐(0)

HDU 4758 Walk Through Squares (2013南京网络赛1011题,AC自动机+DP)
摘要:Walk Through SquaresTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 200Accepted Submission(s): 57Problem DescriptionOn the beaming day of 60th anniversary of NJUST, as a military college which was Second Artillery Academy of Harbin Military Enginee 阅读全文

posted @ 2013-09-22 12:12 kuangbin 阅读(1169) 评论(0) 推荐(0)

HDU 4745 Two Rabbits (2013杭州网络赛1008,最长回文子串)
摘要:Two RabbitsTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 505Accepted Submission(s): 260Problem DescriptionLong long ago, there lived two rabbits Tom and Jerry in the forest. On a sunny afternoon, they planned to play a game with some stones. The 阅读全文

posted @ 2013-09-17 23:58 kuangbin 阅读(696) 评论(0) 推荐(0)

HDU 4747 Mex (2013杭州网络赛1010题,线段树)
摘要:MexTime Limit: 15000/5000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 623Accepted Submission(s): 209Problem DescriptionMex is a function on a set of integers, which is universally used for impartial game theorem. For a non-negative integer set S, mex(S) is defined a 阅读全文

posted @ 2013-09-17 23:50 kuangbin 阅读(3233) 评论(0) 推荐(1)

HDU 4741 Save Labman No.004 (2013杭州网络赛1004题,求三维空间异面直线的距离及最近点)
摘要:Save Labman No.004Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 624Accepted Submission(s): 154Problem DescriptionDue to the preeminent research conducted by Dr. Kyouma, human beings have a breakthrough in the understanding of time and universe. A 阅读全文

posted @ 2013-09-15 23:10 kuangbin 阅读(1504) 评论(0) 推荐(0)

HDU 4739 Zhuge Liang's Mines (2013杭州网络赛1002题)
摘要:Zhuge Liang's MinesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 239Accepted Submission(s): 110Problem DescriptionIn the ancient three kingdom period, Zhuge Liang was the most famous and smartest military leader. His enemy was Shima Yi, who a 阅读全文

posted @ 2013-09-15 23:05 kuangbin 阅读(1038) 评论(0) 推荐(0)

HDU 4738 Caocao's Bridges (2013杭州网络赛1001题,连通图,求桥)
摘要:Caocao's BridgesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 194Accepted Submission(s): 89Problem DescriptionCaocao was defeated by Zhuge Liang and Zhou Yu in the battle of Chibi. But he wouldn't give up. Caocao's army still was not 阅读全文

posted @ 2013-09-15 22:38 kuangbin 阅读(3195) 评论(1) 推荐(0)

HDU 4737 A Bit Fun (2013成都网络赛)
摘要:A Bit FunTime Limit: 5000/2500 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 423Accepted Submission(s): 270Problem DescriptionThere are n numbers in a array, as a0, a1... , an-1, and another number m. We define a function f(i, j) = ai|ai+1|ai+2| ... | aj. Where " 阅读全文

posted @ 2013-09-15 00:27 kuangbin 阅读(1264) 评论(0) 推荐(0)

HDU 4734 F(x) (2013成都网络赛,数位DP)
摘要:F(x)Time Limit: 1000/500 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 382Accepted Submission(s): 137Problem DescriptionFor a decimal number x with n digits (AnAn-1An-2... A2A1), we define its weight as F(x) = An* 2n-1+ An-1* 2n-2+ ... + A2* 2 + A1* 1. Now you are giv 阅读全文

posted @ 2013-09-15 00:25 kuangbin 阅读(3260) 评论(1) 推荐(0)

HDU 4733 G(x) (2013成都网络赛,递推)
摘要:G(x)Time Limit: 2000/500 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 184Accepted Submission(s): 44Problem DescriptionFor a binary number x with n digits (AnAn-1An-2... A2A1), we encode it asWhere "" is bitwise XOR operation and "" indicates the l 阅读全文

posted @ 2013-09-15 00:22 kuangbin 阅读(1731) 评论(2) 推荐(0)

HDU 4731 Minimum palindrome (2013成都网络赛,找规律构造)
摘要:Minimum palindromeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 260Accepted Submission(s): 127Problem DescriptionSetting password is very important, especially when you have so many "interesting" things in "F:\TDDOWNLOAD".We d 阅读全文

posted @ 2013-09-15 00:18 kuangbin 阅读(1123) 评论(0) 推荐(0)

HDU 4730 We Love MOE Girls (2013成都网络赛,签到水题)
摘要:We Love MOE GirlsTime Limit: 1000/500 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 208Accepted Submission(s): 157Problem DescriptionChikami Nanako is a girl living in many different parallel worlds. In this problem we talk about one of them.In this world, Nanako has 阅读全文

posted @ 2013-09-15 00:13 kuangbin 阅读(1324) 评论(0) 推荐(0)

HDU 4718 The LCIS on the Tree (动态树LCT)
摘要:The LCIS on the TreeTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 175Accepted Submission(s): 40Problem DescriptionFor a sequence S1, S2, ... , SN, and a pair of integers (i, j), if 1 9 #include 10 #include 11 #include 12 #include 13 #includ... 阅读全文

posted @ 2013-09-13 22:33 kuangbin 阅读(1810) 评论(0) 推荐(0)

HDU 4727 The Number Off of FFF (水题)
摘要:The Number Off of FFFTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 78Accepted Submission(s): 36Problem DescriptionX soldiers from the famous "*FFF*army" is standing in a line, from left to right.You, as the captain of*FFF*, decides to h 阅读全文

posted @ 2013-09-11 17:47 kuangbin 阅读(1138) 评论(0) 推荐(0)

HDU 4726 Kia's Calculation(贪心)
摘要:Kia's CalculationTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 83Accepted Submission(s): 16Problem DescriptionDoctor Ghee is teaching Kia how to calculate the sum of two integers. But Kia is so careless and alway forget to carry a number when 阅读全文

posted @ 2013-09-11 17:46 kuangbin 阅读(1711) 评论(0) 推荐(0)

HDU 4725 The Shortest Path in Nya Graph (最短路)
摘要:The Shortest Path in Nya GraphTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 37Accepted Submission(s): 6Problem DescriptionThis is a very easy problem, your task is just calculate el camino mas corto en un grafico, and just solo hay que cambiar un 阅读全文

posted @ 2013-09-11 17:44 kuangbin 阅读(4055) 评论(11) 推荐(0)

HDU 4720 Naive and Silly Muggles (简单计算几何)
摘要:Naive and Silly MugglesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 24Accepted Submission(s): 17Problem DescriptionThree wizards are doing a experiment. To avoid from bothering, a special magic is set around them. The magic forms a circle, which 阅读全文

posted @ 2013-09-11 17:38 kuangbin 阅读(1358) 评论(0) 推荐(0)

HDU 4717 The Moving Points (三分)
摘要:The Moving PointsTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 72Accepted Submission(s): 18Problem DescriptionThere are N points in total. Every point moves in certain direction and certain speed. We want to know at what time that the largest dis 阅读全文

posted @ 2013-09-11 17:35 kuangbin 阅读(926) 评论(1) 推荐(0)

HDU 4716 A Computer Graphics Problem (水题)
摘要:A Computer Graphics ProblemTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 43Accepted Submission(s): 40Problem DescriptionIn this problem we talk about the study of Computer Graphics. Of course, this is very, very hard.We have designed a new mobile 阅读全文

posted @ 2013-09-11 17:34 kuangbin 阅读(786) 评论(0) 推荐(0)

SPOJ 1811. Longest Common Substring (LCS,两个字符串的最长公共子串, 后缀自动机SAM)
摘要:1811. Longest Common SubstringProblem code: LCSA string is finite sequence of characters over a non-empty finite set Σ.In this problem, Σ is the set of lowercase letters.Substring, also called factor, is a consecutive sequence of characters occurrences at least once in a string.Now your task is simp 阅读全文

posted @ 2013-09-09 00:23 kuangbin 阅读(2128) 评论(0) 推荐(1)

HDU 4714 Tree2cycle (树形DP)
摘要:Tree2cycleTime Limit: 15000/8000 MS (Java/Others)Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 324Accepted Submission(s): 54Problem DescriptionA tree with N nodes and N-1 edges is given. To connect or disconnect one edge, we need 1 unit of cost respectively. The nodes are labeled f 阅读全文

posted @ 2013-09-08 19:51 kuangbin 阅读(1280) 评论(0) 推荐(0)

HDU 4715 Difference Between Primes
摘要:Difference Between PrimesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 338Accepted Submission(s): 78Problem DescriptionAll you know Goldbach conjecture.That is to say, Every even integer greater than 2 can be expressed as the sum of two primes. T 阅读全文

posted @ 2013-09-08 19:51 kuangbin 阅读(710) 评论(0) 推荐(0)

HDU 4710 Balls Rearrangement
摘要:Balls RearrangementTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 93Accepted Submission(s): 35Problem DescriptionBob has N balls and A boxes. He numbers the balls from 0 to N-1, and numbers the boxes from 0 to A-1. To find the balls easily, he put 阅读全文

posted @ 2013-09-08 19:48 kuangbin 阅读(512) 评论(0) 推荐(0)

HDU 4709 Herding (枚举)
摘要:HerdingTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 415Accepted Submission(s): 59Problem DescriptionLittle John is herding his father's cattles. As a lazy boy, he cannot tolerate chasing the cattles all the time to avoid unnecessary omission 阅读全文

posted @ 2013-09-08 19:47 kuangbin 阅读(855) 评论(0) 推荐(0)

HDU 4708 Rotation Lock Puzzle (简单题)
摘要:Rotation Lock PuzzleTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 290Accepted Submission(s): 60Problem DescriptionAlice was felling into a cave. She found a strange door with a number square matrix. These numbers can be rotated around the center 阅读全文

posted @ 2013-09-08 19:46 kuangbin 阅读(1095) 评论(0) 推荐(0)

HDU 4707 Pet (水题)
摘要:PetTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 181Accepted Submission(s): 55Problem DescriptionOne day, Lin Ji wake up in the morning and found that his pethamster escaped. He searched in the room but didn’t find the hamster. He tried to use so 阅读全文

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

HDU 4706 Children's Day (水题)
摘要:Children's DayTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 158Accepted Submission(s): 72Problem DescriptionToday is Children's Day. Some children ask you to output a big letter 'N'. 'N' is constituted by two vertical line 阅读全文

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

ZOJ 2112 Dynamic Rankings (动态第k大,树状数组套主席树)
摘要:Dynamic RankingsTime Limit:10 Seconds Memory Limit:32768 KBThe Company Dynamic Rankings has developed a new kind of computer that is no longer satisfied with the query like to simply find the k-th smallest number of the given N numbers. They have developed a more powerful system such that for N numb 阅读全文

posted @ 2013-09-08 10:32 kuangbin 阅读(6480) 评论(0) 推荐(2)

SPOJ 10628. Count on a tree (树上第k大,LCA+主席树)
摘要:10628. Count on a treeProblem code: COTYou are given a tree withNnodes.The tree nodes are numbered from1toN.Each node has an integer weight.We will ask you to perform the following operation:u v k: ask for the kth minimum weight on the path from nodeuto nodevInputIn the first line there are two inte 阅读全文

posted @ 2013-09-07 07:42 kuangbin 阅读(2101) 评论(0) 推荐(0)

SPOJ 3267. D-query (主席树,查询区间有多少个不相同的数)
摘要:3267. D-queryProblem code: DQUERYEnglishVietnameseGiven a sequence of n numbers a1, a2, ..., anand a number of d-queries. A d-query is a pair (i, j) (1 ≤ i ≤ j ≤ n). For each d-query (i, j), you have to return the number of distinct elements in the subsequence ai, ai+1, ..., aj.InputLine 1: n (1 ≤ n 阅读全文

posted @ 2013-09-06 12:15 kuangbin 阅读(2493) 评论(0) 推荐(0)

POJ 2104 && POJ 2761 (静态区间第k大,主席树)
摘要:查询区间第K大,而且没有修改。使用划分树是可以做的。作为主席树的入门题,感觉太神奇了,Orz 1 /* *********************************************** 2 Author :kuangbin 3 Created Time :2013-9-4 20:13:20 4 File Name :POJ2104.cpp 5 ************************************************ */ 6 7 #include 8 #include 9 #include 10 #incl... 阅读全文

posted @ 2013-09-05 10:29 kuangbin 阅读(3788) 评论(0) 推荐(0)

POJ 1330 Nearest Common Ancestors (LCA,倍增算法,在线算法)
摘要:1 /* *********************************************** 2 Author :kuangbin 3 Created Time :2013-9-5 9:45:17 4 File Name :F:\2013ACM练习\专题学习\LCA\POJ1330_3.cpp 5 ************************************************ */ 6 7 #include 8 #include 9 #include 10 #include 11 #include 12 #i... 阅读全文

posted @ 2013-09-05 10:22 kuangbin 阅读(2344) 评论(0) 推荐(0)

POJ 1470 Closest Common Ancestors (LCA,离线Tarjan算法)
摘要:Closest Common AncestorsTime Limit:2000MSMemory Limit:10000KTotal Submissions:13372Accepted:4340DescriptionWrite a program that takes as input a rooted tree and a list of pairs of vertices. For each pair (u,v) the program determines the closest common ancestor of u and v in the tree. The closest com 阅读全文

posted @ 2013-09-05 09:34 kuangbin 阅读(1696) 评论(0) 推荐(0)

POJ 1470 Closest Common Ancestors (LCA, dfs+ST在线算法)
摘要:Closest Common AncestorsTime Limit:2000MSMemory Limit:10000KTotal Submissions:13370Accepted:4338DescriptionWrite a program that takes as input a rooted tree and a list of pairs of vertices. For each pair (u,v) the program determines the closest common ancestor of u and v in the tree. The closest com 阅读全文

posted @ 2013-09-05 09:03 kuangbin 阅读(646) 评论(0) 推荐(0)

POJ 1330 Nearest Common Ancestors (LCA,dfs+ST在线算法)
摘要:Nearest Common AncestorsTime Limit:1000MSMemory Limit:10000KTotal Submissions:14902Accepted:7963DescriptionA rooted tree is a well-known data structure in computer science and engineering. An example is shown below:In the figure, each node is labeled with an integer from {1, 2,...,16}. Node 8 is the 阅读全文

posted @ 2013-09-05 08:42 kuangbin 阅读(1162) 评论(0) 推荐(0)

BZOJ 2002: [Hnoi2010]Bounce 弹飞绵羊 (动态树LCT)
摘要:2002: [Hnoi2010]Bounce 弹飞绵羊Time Limit:10 SecMemory Limit:259 MBSubmit:2843Solved:1519[Submit][Status]Description某天,Lostmonkey发明了一种超级弹力装置,为了在他的绵羊朋友面前显摆,他邀请小绵羊一起玩个游戏。游戏一开始,Lostmonkey在地上沿着一条直线摆上n个装置,每个装置设定初始弹力系数ki,当绵羊达到第i个装置时,它会往后弹ki步,达到第i+ki个装置,若不存在第i+ki个装置,则绵羊被弹飞。绵羊想知道当它从第i个装置起步时,被弹几次后会被弹飞。为了使得游戏更有趣, 阅读全文

posted @ 2013-09-04 08:28 kuangbin 阅读(3006) 评论(0) 推荐(1)

HDU 4010 Query on The Trees (动态树)
摘要:Query on The TreesTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 1527Accepted Submission(s): 747Problem DescriptionWe have met so many problems on the tree, so today we will have a query problem on a set of trees.There are N nodes, each node will 阅读全文

posted @ 2013-09-04 01:43 kuangbin 阅读(2598) 评论(10) 推荐(0)

SPOJ 375. Query on a tree (动态树)
摘要: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 tiorQUERY a b: ask for the maximum edge 阅读全文

posted @ 2013-09-04 00:10 kuangbin 阅读(1627) 评论(0) 推荐(0)

BZOJ 2049: [Sdoi2008]Cave 洞穴勘测 (动态树入门)
摘要:2049: [Sdoi2008]Cave 洞穴勘测Time Limit:10 SecMemory Limit:259 MBSubmit:1528Solved:644[Submit][Status]Description辉辉热衷于洞穴勘测。某天,他按照地图来到了一片被标记为JSZX的洞穴群地区。经过初步勘测,辉辉发现这片区域由n个洞穴(分别编号为1到n)以及若干通道组成,并且每条通道连接了恰好两个洞穴。假如两个洞穴可以通过一条或者多条通道按一定顺序连接起来,那么这两个洞穴就是连通的,按顺序连接在一起的这些通道则被称之为这两个洞穴之间的一条路径。洞穴都十分坚固无法破坏,然而通道不太稳定,时常因为外 阅读全文

posted @ 2013-09-03 23:32 kuangbin 阅读(2996) 评论(0) 推荐(1)

导航

JAVASCRIPT: