亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

蟲蟲首頁| 資源下載| 資源專輯| 精品軟件
登錄| 注冊

您現在的位置是:蟲蟲下載站 > 資源下載 > 書籍源碼 > Tug of War(A tug of war is to be arranged at the local office picnic. For the tug of war, the picnic

Tug of War(A tug of war is to be arranged at the local office picnic. For the tug of war, the picnic

  • 資源大小:2 K
  • 上傳時間: 2014-01-07
  • 上傳用戶:cq745
  • 資源積分:2 下載積分
  • 標      簽: picnic the tug war

資 源 簡 介

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

相 關 資 源

主站蜘蛛池模板: 镇江市| 屯留县| 安仁县| 东丽区| 宁晋县| 扬州市| 政和县| 云霄县| 渝北区| 莎车县| 罗江县| 南江县| 晋江市| 东阿县| 兰考县| 科尔| 思茅市| 郧西县| 中宁县| 师宗县| 永春县| 绥滨县| 民丰县| 博客| 舟山市| 南城县| 石渠县| 白朗县| 武冈市| 江山市| 昌江| 克拉玛依市| 阜阳市| 沙湾县| 雷州市| 溧水县| 洛隆县| 财经| 军事| 宽甸| 江安县|