下载中心
Tug of War(A tug of war is to be arranged at the local office picnic. For the tug of war, the picnicrar
1星 发布者: nonogugu66

2014-03-05 | 1积分 | 930B |  0 次下载

下载 收藏 评论

文档简介
标签: the

the

local

local

office

office

picnic

office

for

for

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. )

评论
相关视频
  • 控制系统仿真与CAD

  • PLC功能指令应用详解

  • 微波毫米波电路分析与设计

  • Android车载系统框架

  • 天线原理与基本参数

  • 嵌入式电机驱动 SoC NSUC1610 的座椅通风应用解说

推荐帖子
精选电路图
  • PIC单片机控制的遥控防盗报警器电路

  • 使用ESP8266从NTP服务器获取时间并在OLED显示器上显示

  • 带有短路保护系统的5V直流稳压电源电路图

  • 如何构建一个触摸传感器电路

  • 如何调制IC555振荡器

  • 基于ICL296的大电流开关稳压器电源电路

×