Tug of War(A tug of war is to be arranged at the local office picnic. For the tug of war, the picnic - 免費(fèi)下載

書(shū)籍源碼資源 文件大小:2 K

?? 資源詳細(xì)信息

文件格式
RAR
所屬分類(lèi)
上傳用戶
上傳時(shí)間
文件大小
2 K
所需積分
2 積分
推薦指數(shù)
????? (5/5)

?? 溫馨提示:本資源由用戶 cq745 上傳分享,僅供學(xué)習(xí)交流使用。如有侵權(quán),請(qǐng)聯(lián)系我們刪除。

資源簡(jiǎn)介

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

源碼文件列表

?? 共 1 個(gè)源碼文件 點(diǎn)擊文件名可在線查看源代碼

1 ??
tug og war.txt
大小: 2.27 KB
查看源碼
??
溫馨提示:點(diǎn)擊文件名或"查看源碼"按鈕可在線瀏覽源代碼,支持語(yǔ)法高亮顯示。

立即下載此資源

提示:下載后請(qǐng)用壓縮軟件解壓,推薦使用 WinRAR 或 7-Zip

資源說(shuō)明

?? 下載說(shuō)明

  • 下載需消耗 2積分
  • 24小時(shí)內(nèi)重復(fù)下載不扣分
  • 支持?jǐn)帱c(diǎn)續(xù)傳
  • 資源永久有效

?? 使用說(shuō)明

  • 下載后用解壓軟件解壓
  • 推薦 WinRAR 或 7-Zip
  • 如有密碼請(qǐng)查看說(shuō)明
  • 解壓后即可使用

?? 積分獲取

  • 上傳資源獲得積分
  • 每日簽到免費(fèi)領(lǐng)取
  • 邀請(qǐng)好友注冊(cè)獎(jiǎng)勵(lì)
  • 查看詳情 →

相關(guān)標(biāo)簽

點(diǎn)擊標(biāo)簽查看更多相關(guān)資源:

相關(guān)資源推薦