时间限制: 1 Sec 内存限制: 128 MB Yang Hui's Triangle is defined as follow. In the first layer, there are two numbers A1,1 and A1,2 satisfying A1,1 = A1,2 = 1. Then for each i > 1, the i-th layer contains i + 1 numbers satisfying Ai,1 = Ai,i+1 = 1 and Ai,j =…
Bisharp and Charizard Time Limit: 1 Sec Memory Limit: 256 MB Description Dragon is watching NBA. He loves James and Miami Heat. Here's an introduction of basketball game:http://en.wikipedia.org/wiki/Basketball. However the game in Dragon's version i…
C. Day at the Beach One day Squidward, Spongebob and Patrick decided to go to the beach. Unfortunately, the weather was bad, so the friends were unable to ride waves. However, they decided to spent their time building sand castles. At the end of the…
题目:(据说是facebook的面试题哦) The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11.11 is read off as "two 1s" or 21.21 is read off as "one 2, then one 1&qu…