Problem Description
Ted is a employee of Always Cook Mushroom (ACM). His boss Matt gives him a pack of mushrooms and ask him to grade each mushroom according to its weight. Suppose the weight of...
分类:
其他好文 时间:
2014-09-21 19:16:31
阅读次数:
303
Problem Description
In our daily life we often use 233 to express our feelings. Actually, we may say 2333, 23333, or 233333 ... in the same meaning. And here is the question: Suppose we have a matrix...
分类:
其他好文 时间:
2014-09-14 23:42:47
阅读次数:
342
http://poj.org/problem?id=1860DescriptionSeveral currency exchange points are working in our city. Let us suppose that each point specializes in two p...
分类:
其他好文 时间:
2014-09-13 20:08:45
阅读次数:
410
Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices.Since matrix multiplication is associative, the order in which multiplications are performed isarbitrary. How...
分类:
其他好文 时间:
2014-09-13 09:26:28
阅读次数:
210
PAT 1086 Tree Traversals Again题目:An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that wh...
分类:
其他好文 时间:
2014-09-07 11:02:25
阅读次数:
183
Problem Description
For an array, the range function is defined below: Range(A)=Max(A)-Min(A)+1; For example, suppose A={1,2,3,4,5}, then Range(A)=5-1+1=5. Now, given an array A(length≤100000), you a...
分类:
其他好文 时间:
2014-09-03 22:42:27
阅读次数:
266
Search in Rotated Sorted Array
Total Accepted: 22300 Total
Submissions: 77945My Submissions
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
(i.e., 0 1 2 4 5 6 ...
分类:
其他好文 时间:
2014-08-25 21:15:35
阅读次数:
227
def hello # A nice simple method puts "Hello World" # Suppose we want to augment it...end alias original_hello hello # Give the method a backup named....
分类:
其他好文 时间:
2014-08-24 10:17:32
阅读次数:
167
Description
Suppose that the fourth generation mobile phone base stations in the Tampere area operate as follows. The area is divided into squares. The squares form an S * S matrix with the rows ...
分类:
其他好文 时间:
2014-08-22 12:56:59
阅读次数:
196
Coin Change
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 13500 Accepted Submission(s): 4510
Problem Description
Suppose there...
分类:
其他好文 时间:
2014-08-19 20:54:35
阅读次数:
292