Blogtrottr
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中 
排列與組合問題 C++
Jul 31st 2013, 11:07

問題如下:
一開始輸入兩個整數 分別為 k 與 n -> (k,n)

當我輸入的 k = 5 , n = 2 時 跑出以下組合
12 13 14 15 23 24 25 34 35 45

當我輸入的 k = 5 , n = 3 時 跑出以下組合
123 124 125 234 235 345

組合後的每組集合不能有重複的數值出現

而且k 與 n 的數值限制在 1 ~ 200之間

我目前只會處理固定的n, In general的情況我想了很久還是解不出來

謝謝各位

This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers. Five Filters recommends: 'You Say What You Like, Because They Like What You Say' - http://www.medialens.org/index.php/alerts/alert-archive/alerts-2013/731-you-say-what-you-like-because-they-like-what-you-say.html

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜

    jmuko99 發表在 痞客邦 留言(0) 人氣()