原创 HDU 3915 Game(拆位,高斯消元)

Problem Description   Mr.Frost is a child who is too simple, sometimes naive, always plays some simple but interestin

原创 hihocoder 1103 Colorful Lecture Note(字符串處理)

Little Hi is writing an algorithm lecture note for Little Ho. To make the note more comprehensible, Little Hi tries to

原创 Codeforces 548E Mike and Foam(容斥)

Mike is a bartender at Rico's bar. At Rico's, they put beer glasses in a special shelf. There are n kinds of bee

原创 POJ 2774 Long Long Message(2.3 求兩個字符串的最長公共子串)

Description The little cat is majoring in physics in the capital of Byterland. A piece of sad news comes to him these

原创 HDU 3221 Brute-force Algorithm(歐拉公式降冪)

Problem Description Professor Brute is not good at algorithm design. Once he was asked to solve a path finding proble

原创 HDU 4912 Paths on the tree(LCA+貪心)

Problem Description bobo has a tree, whose vertices are conveniently labeled by 1,2,…,n. There are m paths on the tre

原创 POJ 3904 Sky Code(容斥)

Description Stancu likes space travels but he is a poor software developer and will never be able to buy his own space

原创 TC 667 #DIV2

250 points: ou are given two distinct points A and B in the two-dimensional plane. Your task is to find any point C w

原创 TC 668 #DIV2

250 points:   You are going to send a message to your friend. The message is given as the stringmessage. To confuse po

原创 HDU 4248 A Famous Stone Collector(組合計數)

Problem Description Mr. B loves to play with colorful stones. There are n colors of stones in his collection. Two sto

原创 HDU 4407 Sum(容斥)

Description XXX is puzzled with the question below:  1, 2, 3, ..., n (1<=n<=400000) are placed in a line. There a

原创 Light OJ 1382 The Queue(組合計數)

On some special occasions Nadia's company provide very special lunch for all employees of the company. Before the food

原创 HDU 2256 Problem of Precision(矩陣快速冪)

Problem Description   Input The first line of input gives the number of cases, T. T test cases follow, each on a

原创 Light OJ 1095 Arrange the Numbers(計數)

Consider this sequence {1, 2, 3 ... N}, as an initial sequence of first N natural numbers. You can rearrange this seque

原创 ZOJ 3547 The Boss on Mars(容斥)

On Mars, there is a huge company called ACM (A huge Company on Mars), and it’s owned by a younger boss. Due to no moons