排列列表??真的需要帮助 [英] Permutation lists?? Really Need Help

查看:65
本文介绍了排列列表??真的需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我正在从事一个个人兴趣项目,现在已经在这个问题上花了大约5个小时来支撑我的大脑

,跟踪旧的

新闻组帖子,但还没有计算出来,所以继续我的问题。


我希望能够列出所有数字的可能组合(重复允许
)数字,其中X是任意物之间的任意initeger

如0和100

和x的数量在这个例子中,10是'x
',这是任意的。


x,x,x,x,x,x,x ,x,x,x


我想为此找到所有可能的组合。最后,我会得到每个x组的x'的所有可能组合的列表。

将是0到100之间的数字。 br />

感谢您的帮助。

Hello,

I am working on a personal interest project and have been racking my brain
on this problem for about 5 hours total now, and tracking through old
newsgroup posts but haven''t figuried it out yet so heres my question.

I want to be able to make a list of all possible combinations (repitiions
are allowed) of numbers where X is a arbitrary initeger between something
like 0 and 100
and the number of x''s is arbitrary as well in this example 10 x''s are
present.

x,x,x,x,x,x,x,x,x,x

I want to find all possible combinations for this. In the end I would have
a list of all possible combinations of the x''s in groups of ten whre each x
would be a number between 0 and 100.

Thanks for any help.

推荐答案

Roger B.写道:
Roger B. wrote:
我正在开展一个个人兴趣项目,现在已经在这个问题上绞尽脑汁待了大约5个小时[...]


我'我不确定我是否相信。

我希望能够列出所有可能的组合(允许重复数据)数字,其中X是某事物之间的任意组合/>像0和100
和x'的数量也是任意的,在这个例子中,10 x'存在。

x,x,x ,x,x,x,x,x,x,x

我想找到所有可能的组合。最后,我将列出所有可能的x组合组合,每组10个,每个x
将是0到100之间的数字。
I am working on a personal interest project and have been racking my brain
on this problem for about 5 hours total now [...]
I''m not sure I believe that.
I want to be able to make a list of all possible combinations (repitiions
are allowed) of numbers where X is a arbitrary initeger between something
like 0 and 100
and the number of x''s is arbitrary as well in this example 10 x''s are
present.

x,x,x,x,x,x,x,x,x,x

I want to find all possible combinations for this. In the end I would have
a list of all possible combinations of the x''s in groups of ten whre each x
would be a number between 0 and 100.




你知道有1亿000 000 000,对吧?想想一下系统写作方式的
。你可以这样开始:


0,0,0,0,0,0,0,0,0

0,0,0,0 ,0,0,0,0,1

0,0,0,0,0,0,0,0,2

0,0,0,0 ,0,0,0,0,3

0,0,0,0,0,0,0,0,4


阿拉伯人有这一切都在几个世纪前就已经解决了,而且我很确定他们不需要C ++来做这件事。


祝你好运,< br>
Buster。



You do know there are 100 000 000 000 000 000 000, right? Think
of a systematic way of writing them. You might start like this:

0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,1
0,0,0,0,0,0,0,0,2
0,0,0,0,0,0,0,0,3
0,0,0,0,0,0,0,0,4

The Arabs had this all worked out many centuries ago, and
I''m pretty sure they didn''t need C++ to do it.

Good luck,
Buster.


2003年9月25日星期四01:44:04 GMT,Roger B. < ro ******* @ hotmail.com>

写道:
On Thu, 25 Sep 2003 01:44:04 GMT, "Roger B." <ro*******@hotmail.com>
wrote:
你好,

我在工作关于个人兴趣项目并且现在已经在这个问题上花费了大约5个小时的时间来讨论这个问题,并且通过旧的
新闻组帖子进行跟踪但是还没有计算出来,所以继续我的问题。 br />
我希望能够列出所有可能的组合(允许重复数字)数字,其中X是一个任意的initeger之间
如0和100 并且x'的数量也是任意的,在这个例子中,10 x'存在。

x,x,x,x,x,x,x, x,x,x

我想为此找到所有可能的组合。最后,我将列出所有可能的x组合组合,每组10个,每个x
将是0到100之间的数字。
Hello,

I am working on a personal interest project and have been racking my brain
on this problem for about 5 hours total now, and tracking through old
newsgroup posts but haven''t figuried it out yet so heres my question.

I want to be able to make a list of all possible combinations (repitiions
are allowed) of numbers where X is a arbitrary initeger between something
like 0 and 100
and the number of x''s is arbitrary as well in this example 10 x''s are
present.

x,x,x,x,x,x,x,x,x,x

I want to find all possible combinations for this. In the end I would have
a list of all possible combinations of the x''s in groups of ten whre each x
would be a number between 0 and 100.




如果你有一个你想要排列的数字列表

,std :: next_permutation()将为你完成这项工作。如果你想要每个X从0到100计算
,你必须自己做,但它很容易。

很容易。
< br $> b $ b -

见到你。



If you have a list of numbers that you would like to make permutations
of, std::next_permutation() will do the job for you. If you want to
count up every X from 0 to 100 you''ll have to do that yourself, but it''s
easy.

--
Be seeing you.


不是这样。并非所有从1到100的数字都可用于一组

10 x'。数字可以在10'组中重复。我需要所有

组合。并且有很多人可以手工找到,再加上手工操作

会在一段时间后变得非常混乱。这不仅仅是循环或其他什么的计数。它要复杂得多。


PS。对于BUSTER COPLEY - 我不会在我的帖子上贬低**。这是一个个人的利息项目。我已经工作了大约5个小时。谢谢。

" Thore B. Karlsen" < si*@6581.com>在消息中写道

新闻:g5 ******************************** @ 4ax.com ...
That is not it. Not all numbers from 1 to 100 could be used in a group of
10 x''s. And Numbers could be repeated in the group of 10''s. I need all
combinations. And there are to many to find by hand, plus to do it by hand
would end up being very confusing after a while. This is not just a count
up of loops or what else. It is a lot more complicated than that.

PS. TO BUSTER COPLEY - I don''t bullsh** on my posts . It is a personal
interest project. And I have worked on it for about 5 hours. Thank You.
"Thore B. Karlsen" <si*@6581.com> wrote in message
news:g5********************************@4ax.com...
2003年9月25日星期四01:44:04 GMT,Roger B. < ro ******* @ hotmail.com>
写道:
On Thu, 25 Sep 2003 01:44:04 GMT, "Roger B." <ro*******@hotmail.com>
wrote:
您好,

我正在处理个人兴趣项目并且现在已经把我的
脑子里的这个问题总共花了大约5个小时,然后通过旧的
新闻组帖子进行跟踪但是还没有计算出来,所以继续我的问题。

x,x,x,x,x,x,x,x,x,x

我想找到所有可能的组合。最后,我将
列出所有可能的x'组合列表,每组10个,每个
x将是0到100之间的数字。
Hello,

I am working on a personal interest project and have been racking my brainon this problem for about 5 hours total now, and tracking through old
newsgroup posts but haven''t figuried it out yet so heres my question.

I want to be able to make a list of all possible combinations (repitiions
are allowed) of numbers where X is a arbitrary initeger between something
like 0 and 100
and the number of x''s is arbitrary as well in this example 10 x''s are
present.

x,x,x,x,x,x,x,x,x,x

I want to find all possible combinations for this. In the end I would havea list of all possible combinations of the x''s in groups of ten whre each xwould be a number between 0 and 100.



-
见到你。



If you have a list of numbers that you would like to make permutations
of, std::next_permutation() will do the job for you. If you want to
count up every X from 0 to 100 you''ll have to do that yourself, but it''s
easy.

--
Be seeing you.



这篇关于排列列表??真的需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆