亚洲欧美第一页_禁久久精品乱码_粉嫩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. )

相 關 資 源

主站蜘蛛池模板: 秦安县| 罗山县| 旺苍县| 万安县| 鸡东县| 巴楚县| 襄汾县| 平江县| 团风县| 满洲里市| 田阳县| 蕉岭县| 连云港市| 秭归县| 清丰县| 枣阳市| 观塘区| 高青县| 台东市| 天全县| 上犹县| 梨树县| 辽阳县| 汤阴县| 广灵县| 武鸣县| 江北区| 呼图壁县| 鱼台县| 马边| 泊头市| 资中县| 唐山市| 岗巴县| 武夷山市| 永州市| 若羌县| 莱阳市| 兰考县| 平江县| 茶陵县|