<p>Some people think that the bigger an elephant is, the smarter it is. To disprove this, you want to analyze a collection of elephants and place as large a subset of elephants as possible into a sequence whose weights are increasing but IQ's are decreas…

2020年1月17日 0条评论 2128点热度 0人点赞 code 阅读全文

Tug of war is a contest of brute strength, where two teams of people pull in opposite directions on a rope. The team that succeeds in pulling the rope in their direction is declared the winner. A tug of war is being arranged for the office picnic. The picnicke…

2020年1月17日 0条评论 2145点热度 0人点赞 code 阅读全文

<p>Little Bishops A bishop is a piece used in the game of chess which can only move diagonally from its current position. Two bishops attack each other if one is on the path of the other. In the figure below, the dark squares represent the reachable loca…

2020年1月17日 0条评论 1366点热度 0人点赞 code 阅读全文

<p>A company offers personal computers for sale in N towns ( 3&lt;=N&lt;=35), denoted by 1, 2,..., N. There are direct routes connecting M pairs among these towns. The company decides to build servicing stations to ensure that for any town X, the…

2020年1月17日 0条评论 1074点热度 0人点赞 code 阅读全文

I collect marbles (colorful small glass balls) and want to buy boxes to store them. The boxes come in two types: Type 1: each such box costs c1 dollars and can hold exactly n1 marbles Type 2: each such box costs c2 dollars and can hold exactly n2 marbles I wan…

2020年1月17日 0条评论 1444点热度 0人点赞 code 阅读全文

The factorial function, n! is defined as follows for all non-negative integers n: 0! = 1 n! = n x (n - 1)! (n > 0) We say that a divides b if there exists an integer k such that k x a = b

2020年1月17日 0条评论 1385点热度 0人点赞 code 阅读全文