seven distinct pieces of candy are to be distributed among three bags .the red bag and the blue bag must each receive at least one piece of candy,the white bag may remain empty .how many arrangement are possible?可是选项A 1930B 1931C 1932D 1933E

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/03 05:59:36
seven distinct pieces of candy are to be distributed among three bags .the red bag and the blue bag must each receive at least one piece of candy,the white bag may remain empty .how many arrangement are possible?可是选项A 1930B 1931C 1932D 1933E

seven distinct pieces of candy are to be distributed among three bags .the red bag and the blue bag must each receive at least one piece of candy,the white bag may remain empty .how many arrangement are possible?可是选项A 1930B 1931C 1932D 1933E
seven distinct pieces of candy are to be distributed among three bags .the red bag and the blue bag must each receive at least one piece of candy,the white bag may remain empty .how many arrangement are possible?
可是选项
A 1930
B 1931
C 1932
D 1933
E 1934

seven distinct pieces of candy are to be distributed among three bags .the red bag and the blue bag must each receive at least one piece of candy,the white bag may remain empty .how many arrangement are possible?可是选项A 1930B 1931C 1932D 1933E
AMC?
哈哈我也参加过
楼主你要注意 distinct 这个词
由于是不同的candy
所用的应该是排列组合.
题意是 红蓝袋子里必须至少有一块
白袋子里可以没有
所以
先把每个颜色袋子里的糖的个数列举一下:
红蓝白
6 1 0
5 2 0
4 3 0
3 4 0
2 5 0
1 6 0
5 1 1
4 2 1
3 3 1
2 4 1
1 5 1
4 1 2
3 2 2
2 3 2
1 4 2
3 1 3
2 2 3
1 3 3
2 1 4
1 2 4
1 1 5
共二十一种
先给你举个例子算第一种.即 :红袋子 6 块 ,蓝的 1 块,白袋子没有
C7/1,共有7种;
再算第二种.即 :红袋子 5 块 ,蓝的 2 块,白袋子没有
C7/2
......
前六种就是:(C7/1 + C7/2 + … +C7/6)
总共就是:
(C7/1 + C7/2 + … +C7/6)
+ C7/1 x (C6/1+C6/2+…+C6/5)
+ C7/2 x (C5/1+...+C5/4)
+ C7/3 x (C4/1+...+C4/3)
+ C7/4 x (C3/1+C3/2)
+ C7/5 x C2/1
有一个方便求和的公式我忘了,用计算器按一下,得1932
或者不用按,这个答案至少可以被7整除,
那毫无疑问选C啦~
恩,完毕
希望不要辜负我的辛苦劳作.

翻译了一下:7块蛋糕放仨盒子:红,蓝,白。
红蓝盒子至少各放一块,问有多少种放法?
=_=!
AMC是什么?
我只知道ACM。
这个大概是要写一个程序吧
(下面这个是7个蛋糕都得放进去的。如果可以有蛋糕不用放进去就把i+j+k==7这句改成i+j+k<=7)
#include
main(){
int n=0...

全部展开

翻译了一下:7块蛋糕放仨盒子:红,蓝,白。
红蓝盒子至少各放一块,问有多少种放法?
=_=!
AMC是什么?
我只知道ACM。
这个大概是要写一个程序吧
(下面这个是7个蛋糕都得放进去的。如果可以有蛋糕不用放进去就把i+j+k==7这句改成i+j+k<=7)
#include
main(){
int n=0,i,j,k;
/*i是红盒子,j是蓝盒子,k是白盒子,n用来计数*/
for(i=1;i<=6;i++){
for(j=1;j<=7-i;j++){
for(k=0;k<=7-i-j;k++){
if(i+j+k==7){
n++;
}
}
}
}
printf("%d",n);
}
我运行出来:
i+j+k==7 的情况有21种
i+j+k<=7 的情况有56种

收起

枚举…

R 1 1 1 1 1 1
B 1 2 3 4 5 6
W 5 4 3 2 1 0
R 2 2 2 2 2
B 1 2 3 4 5
W 4 3 2 1 0
R 3 3 3 3

B 1 2 3 4
W 3 2...

全部展开

枚举…

R 1 1 1 1 1 1
B 1 2 3 4 5 6
W 5 4 3 2 1 0
R 2 2 2 2 2
B 1 2 3 4 5
W 4 3 2 1 0
R 3 3 3 3

B 1 2 3 4
W 3 2 1 0

R 4 4 4

B 1 2 3
W 2 1 0
R 5 5
B 1 2
W 1 0
R 6
B 1
W 0
共6+5+4+3+2+1=21种

收起