For solving the following problem: "There is No Free Lunch" Time Limit: 1 Second Memory Limit: 3 - 免費下載

其他資源 文件大小:2 K

?? 資源詳細信息

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

?? 溫馨提示:本資源由用戶 GreatMarxist 上傳分享,僅供學習交流使用。如有侵權,請聯系我們刪除。

資源簡介

For solving the following problem: "There is No Free Lunch" Time Limit: 1 Second Memory Limit: 32768 KB One day, CYJJ found an interesting piece of commercial from newspaper: the Cyber-restaurant was offering a kind of "Lunch Special" which was said that one could "buy one get two for free". That is, if you buy one of the dishes on their menu, denoted by di with price pi , you may get the two neighboring dishes di-1 and di+1 for free! If you pick up d1, then you may get d2 and the last one dn for free, and if you choose the last one dn, you may get dn-1 and d1 for free. However, after investigation CYJJ realized that there was no free lunch at all. The price pi of the i-th dish was actually calculated by adding up twice the cost ci of the dish and half of the costs of the two "free" dishes. Now given all the prices on the menu, you are asked to help CYJJ find the cost of each of the dishes.

源碼文件列表

?? 共 1 個源碼文件 點擊文件名可在線查看源代碼

1 ??
na_3_02.c
大小: 1.27 KB
查看源碼
??
溫馨提示:點擊文件名或"查看源碼"按鈕可在線瀏覽源代碼,支持語法高亮顯示。

立即下載此資源

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

資源說明

?? 下載說明

  • 下載需消耗 2積分
  • 24小時內重復下載不扣分
  • 支持斷點續傳
  • 資源永久有效

?? 使用說明

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

?? 積分獲取

  • 上傳資源獲得積分
  • 每日簽到免費領取
  • 邀請好友注冊獎勵
  • 查看詳情 →

相關標簽

點擊標簽查看更多相關資源:

相關資源推薦