首頁:http://www.puzzleup.com/2010/
時限:2010/09/23(四)19:00~09/29(三)18:59
答案可上傳5次,但每改1次扣20分(基本分為100分)
在比賽期間內可隨時回答,但只有在時限內回答者有額外加分
◆Sum of Differences
We have 20 different positive integers. The sum of the differences of all
pairs of integers (differences by subtracting smaller integer from the larger
for every pair) is 5000.
What is the maximum possible sum of differences of 15 numbers that remains
after the removal of 5 of the original 20.
Example: For A<B<C, the sum of differences is (B-A)+(C-A)+(C-B).
我們有20個不同的正整數。每對整數的差值和是5000。(差值永遠是大減小)
請問在移走20個數中的五個之後,剩下的15個數每對整數的差值和最大是多少?
例如: 三個數 A<B<C 的每對整數差值和為 (B-A)+(C-A)+(C-B).
--
是個有點 Project Euler 風格的題目....
--
"LPH" is for "Let Program Heal us"....
--
All Comments