Tug of War(A tug of war is to be arranged at the local office picnic. For the tug of war, the picnickers must be divided into two teams. Each person must be on one team or the other the number of people on the two teams must not differ by more than 1 the total weight of the people on each team should be as nearly equal as possible. The first line of input contains n the number of people at the picnic. n lines follow. The first line gives the weight of person 1 the second the weight of person 2 and so on. Each weight is an integer between 1 and 450. There are at most 100 people at the picnic. Your output will be a single line containing 2 numbers: the total weight of the people on one team, and the total weight of the people on the other team. If these numbers differ, give the lesser first. )
上传时间: 2014-01-07
上传用户:离殇
D/A单片机程序,供单片机爱好者参考
标签: 单片机程序
上传时间: 2013-12-25
上传用户:GavinNeko
在线医药销售管理系统(b/s)
上传时间: 2013-12-19
上传用户:moerwang
键盘只有一个键 b ,开发板是自制的
标签: 键盘
上传时间: 2015-02-01
上传用户:xz85592677
数据结构中的B-TREE的实现
上传时间: 2014-01-07
上传用户:小儒尼尼奥
B-树实现索引和快速查找
上传时间: 2015-02-04
上传用户:15736969615
Neural networks : an introduction / B. Muller, J.Reinhardt. 此书的配套软盘
标签: B. introduction Reinhardt networks
上传时间: 2013-12-13
上传用户:wyc199288
2次B样条曲线算法
标签: 算法
上传时间: 2014-01-27
上传用户:来茴
一个B-树实现与编辑
上传时间: 2015-02-04
上传用户:thuyenvinh
图像检索的代码b
上传时间: 2015-02-04
上传用户:奇奇奔奔