HDU 1274 – 展开字符串 [递归]


Link 传送门 Problem 在纺织CAD系统开发过程中,经常会遇到纱线排列的问题。 该问题的描述是这样的:常用纱线的品种一般不会超过25种,所以分别可以用小写字母表示不同的纱线,例如:abc表示三根纱线的排列;重复可以用数字和括号表示,例如:2(abc)表示abcabc;1(a)...

HDU 1274 – 展开字符串 [递归]

Link 传送门 Problem 在纺织CAD系统开发过程中,经常会遇到纱线排列的问题。 该问题的描述是这样的:常用纱线的品种一般不会超过25种,所以分别可以用小写字...
阅读全文 0

HDU 3768 – Shopping [最短路+全排列枚举]


Link 传送门 Problem You have just moved into a new apartment and have a long list of items you need to buy. Unfortunately, to buy this many items requires going to many different stores. You would like to minimize the amount of driving necessary t...

HDU 3768 – Shopping [最短路+全排列枚举]

Link 传送门 Problem You have just moved into a new apartment and have a long list of items you need to buy. Unfortunately, to buy this many items r...
阅读全文 0

HDU 1043 – Eight [最经典的BFS]


Link 传送门 Problem The 15-puzzle has been around for over 100 years; even if you don’t know it by that name, you’ve seen it. It is constructed with 15 sliding tiles, each with a number from 1 to 15 on it, and all packed into a 4 by 4 ...

HDU 1043 – Eight [最经典的BFS]

Link 传送门 Problem The 15-puzzle has been around for over 100 years; even if you don’t know it by that name, you’ve seen it. It is con...
阅读全文 0

HDU 4491 – Windmill Animation [几何]


Link 传送门 Problem A windmill animation works as follows: A two-dimensional set of points, no three of which lie on a line is chosen. Then one of the points is chosen (as the first pivot) and a line is drawn through the chosen point at some initi...

HDU 4491 – Windmill Animation [几何]

Link 传送门 Problem A windmill animation works as follows: A two-dimensional set of points, no three of which lie on a line is chosen. Then one of ...
阅读全文 0

HDU 4490 – Mad Veterinarian [无脑BFS]


Link 传送门 Problem Mad Veterinarian puzzles have a mad veterinarian, who has developed several machines that can transform an animal into one or more animals and back again. The puzzle is then to determine if it is possible to change one collecti...

HDU 4490 – Mad Veterinarian [无脑BFS]

Link 传送门 Problem Mad Veterinarian puzzles have a mad veterinarian, who has developed several machines that can transform an animal into one or m...
阅读全文 0

POJ 2954 – Triangle [几何/Pick定理]


Link 传送门 Problem A lattice point is an ordered pair (x, y) where x and y are both integers. Given the coordinates of the vertices of a triangle (which happen to be lattice points), you are to count the number of lattice points which lie complet...

POJ 2954 – Triangle [几何/Pick定理]

Link 传送门 Problem A lattice point is an ordered pair (x, y) where x and y are both integers. Given the coordinates of the vertices of a triangle ...
阅读全文 0

URAL 1605 – Devil’s Sequence [打表规律+高精度小数]


Link 传送门 Problem Robodevil likes to do some mathematics between rehearsals of his orchestra. Today he invented devilish sequence No. 1729: x0 = 0, x1 = 1, xn = (xn − 1 + xn − 2) / 2. For example, x10 = 0.666015625. Robodevil became interested...

URAL 1605 – Devil’s Sequence [打表规律+高精度小数]

Link 传送门 Problem Robodevil likes to do some mathematics between rehearsals of his orchestra. Today he invented devilish sequence No. 1729: x0 =...
阅读全文 0

POJ 3617 – Best Cow Line [贪心+枚举]


Link 传送门 Problem FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual”Farmer of the Year” competition. In this contest every farmer arranges his cows in a line and herds them past the judges. The contest organizers adopted a...

POJ 3617 – Best Cow Line [贪心+枚举]

Link 传送门 Problem FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual”Farmer of the Year” competition. In this contest every...
阅读全文 0

HDU 4333 – Revolving Digits [扩展KMP]


Link 传送门 Problem One day Silence is interested in revolving the digits of a positive integer. In the revolving operation, he can put several last digits to the front of the integer. Of course, he can put all the digits to the front, so he will ...

HDU 4333 – Revolving Digits [扩展KMP]

Link 传送门 Problem One day Silence is interested in revolving the digits of a positive integer. In the revolving operation, he can put several las...
阅读全文 0

HDU 4760 – Good Firewall [Trie]


Link 传送门 Problem Professor X is an expert in network security. These days, X is planning to build a powerful network firewall, which is called Good Firewall (a.k.a., GFW). Network flows enter in the GFW will be forwarded or dropped according to...

HDU 4760 – Good Firewall [Trie]

Link 传送门 Problem Professor X is an expert in network security. These days, X is planning to build a powerful network firewall, which is called G...
阅读全文 0