版本2和4间的区别 (跳过第2版)
于2006-04-16 18:11:36修订的的版本2
大小: 1243
编辑: czk
备注:
于2008-02-23 15:35:52修订的的版本4
大小: 1321
编辑: localhost
备注: converted to 1.6 markup
删除的内容标记成这样。 加入的内容标记成这样。
行号 1: 行号 1:
## page was renamed from 程序设计练习04——timus1005——Stone Pile

Stone Pile

http://acm.timus.ru/problem.aspx?space=1&num=1005

Time Limit: 2.0 second

Memory Limit: 1 000 КБ

You have a number of stones with known weights W1…Wn. Write a program that will rearrange the stones into two piles such that weight difference between the piles is minimal.

1. Input

Input contains the number of stones N (1 <= N <= 20) and weights of the stones W1…Wn (1 <= Wi <= 100000) delimited by white space (either space characters or new lines).

2. Output

Your program should output a number representing the minimal possible weight difference between stone piles.

3. Sample Input

timus1005 (2008-02-23 15:35:52由localhost编辑)

ch3n2k.com | Copyright (c) 2004-2020 czk.