摘要:
Stars Problem Description Yifenfei is a romantic guy and he likes to count the stars in the sky.To make the problem easier,we considerate the sky is a 阅读全文
摘要:
推箱子 Problem Description 推箱子是一个很经典的游戏.今天我们来玩一个简单版本.在一个M*N的房间里有一个箱子和一个搬运工,搬运工的工作就是把箱子推到指定的位置,注意,搬运工只能推箱子而不能拉箱子,因此如果箱子被推到一个角上(如图2)那么箱子就不能再被移动了,如果箱子被推到一面墙 阅读全文
摘要:
无题 Problem Description 就要复试了,外地的考生都要在学校附近住宾馆了。假设在学校附近有C家宾馆,并且这些宾馆只有单人房,而每家宾馆的价格不一样,学生们都想找价格便宜的住,所以现在需要你的帮助,当有学生需要住宾馆的时候,告诉他哪个宾馆还有空的房间并且价格最便宜。而且有一个要求,同 阅读全文
摘要:
引自:http://blog.csdn.net/acmmaxx/article/details/18409701 逆元: 若,b*b1 % c == 1 则,b1称为b模c的乘法逆元。 在ACM中,许多除法取模都要用到求逆元。 但是,逆元,为什么能给我们带来 ( a/b ) % c == ( a*b 阅读全文
摘要:
Perfect Squares Problem Description A number x is called a perfect square if there exists an integer b satisfying x=b^2. There are many beautiful theo 阅读全文
摘要:
Picture Problem Description Give you the width and height of the rectangle,darw it. Input Input contains a number of test cases.For each case ,there a 阅读全文
摘要:
Solitaire Problem Description Solitaire is a game played on a chessboard 8x8. The rows and columns of the chessboard are numbered from 1 to 8, from th 阅读全文
摘要:
Travel Problem Description One day, Tom traveled to a country named BGM. BGM is a small country, but there are N (N <= 100) towns in it. Each town pro 阅读全文