Problem 2196 --C语言11.5

2196: C语言11.5

"
Time Limit $1$ 秒/Second(s) Memory Limit $512$ 兆字节/Megabyte(s)
提交总数 $38$ 正确数量 $25$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签

口袋中有红、黄、蓝、白、黑5种颜色的球若干个。每次从口袋中先后取出3个球,问得到3种不同颜色的球的可能取法,并输出每一种排列的情况。
要求使用枚举类型来完成本题。

对于每一种排列的情况,在一行内输出所选的三种颜色,用空格隔开。
在输出所有排列的情况之后,在最后一行输出排列的情况总数。
请注意行尾输出换行。

red yellow blue
red yellow white
red yellow black
red blue yellow
red blue white
red blue black
red white yellow
red white blue
red white black
red black yellow
red black blue
red black white
yellow red blue
yellow red white
yellow red black
yellow blue red
yellow blue white
yellow blue black
yellow white red
yellow white blue
yellow white black
yellow black red
yellow black blue
yellow black white
blue red yellow
blue red white
blue red black
blue yellow red
blue yellow white
blue yellow black
blue white red
blue white yellow
blue white black
blue black red
blue black yellow
blue black white
white red yellow
white red blue
white red black
white yellow red
white yellow blue
white yellow black
white blue red
white blue yellow
white blue black
white black red
white black yellow
white black blue
black red yellow
black red blue
black red white
black yellow red
black yellow blue
black yellow white
black blue red
black blue yellow
black blue white
black white red
black white yellow
black white blue
60

推荐代码 查看2196 所有题解 上传题解视频得图灵币

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[$0 $ms] Faith 610187 2020-08-14 17:30:43
内存最少[$940 $KB] 范晋豪@信息与计算科学142 152963 2017-11-16 15:12:24
第一AC 范晋豪@信息与计算科学142 152963 2017-11-16 15:12:24
第一挑战 范晋豪@信息与计算科学142 152963 2017-11-16 15:12:24

赛题来源/所属竞赛 教学题-C语言 C程序设计(第四版)

竞赛编号 竞赛名称 竞赛时间 访问比赛
1426 2019《图灵信息学算法》中级班第10单元:结构体 2019-12-01 16:30:00 请登录