摘要:
``` include include include include using namespace std; const int eps=1E 8; typedef vector vec; typedef vector mat; //求解Ax=b,A是方阵 //当方程组无解或者有无穷多解时,返回 阅读全文
摘要:
Given a set of sticks of various lengths, is it possible to join them end to end to form a square? Input The first line of input contains N, the numbe 阅读全文
摘要:
Farmer John and Betsy are playing a game with N (1 B C从高到底的三个方块,那么dis[A C]=dis[B C]+dis[A B]。需要注意的是路径压缩的时候,递归求节点到根节点的距离,具体请看代码。 include include using 阅读全文
摘要:
A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome becau 阅读全文
摘要:
Eddy's interest is very extensive, recently he is interested in prime number. Eddy discover the all number owned can be divided into the multiply of p 阅读全文
摘要:
A boolean matrix has the parity property when each row and each column has an even sum, i.e. contains an even number of bits which are set. Here's a 4 阅读全文
摘要:
The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult in Flatopia. The Flatopia 阅读全文
摘要:
Two players, Stan and Ollie, play, starting with two natural numbers. Stan, the first player, subtracts any positive multiple of the lesser of the two 阅读全文
摘要:
蜘蛛牌是windows xp操作系统自带的一款纸牌游戏,游戏规则是这样的:只能将牌拖到比她大一的牌上面(A最小,K最大),如果拖动的牌上有按顺序排好的牌时,那么这些牌也跟着一起移动,游戏的目的是将所有的牌按同一花色从小到大排好,为了简单起见,我们的游戏只有同一花色的10张牌,从A到10,且随机的在一 阅读全文
摘要:
In the year 8888, the Earth is ruled by the PPF Empire . As the population growing , PPF needs to find more land for the newborns . Finally , PPF deci 阅读全文