![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
文章平均质量分 80
Rookie-CH
这个作者很懒,什么都没留下…
展开
-
枚举类(Enumerated types)介绍
一、 枚举类(Enumerated types)是一种用户自定义的类型,在定义时用户设置一系列标识符(identifers)(被称为enumerators 枚举子)作为类型的可赋值。枚举类的对象可以选这些enumerator作为其的值。 语法: enum type_name { value1, value2, value3, . . } object_names;翻译 2014-10-14 22:00:22 · 1552 阅读 · 0 评论 -
sicily双栈排序
双栈排序 Tom最近在研究一个有趣的排序问题。如图所示,通过2个栈S1和S2,Tom希望借助以下4种操作实现将输入序列升序排序。 操作a 如果输入序列不为空,将第一个元素压入栈S1 操作b 如果栈S1不为空,将S1栈顶元素弹出至输出序列 操作c 如果输入序列不为空,将第一个元素压入栈S2 操作d 如果栈S2不为空,将S2栈顶元素弹出至输出序列 如果一个1~n的排列P可以通过原创 2014-10-25 23:25:40 · 4525 阅读 · 4 评论 -
Sicily: Candy Sharing Game
题目: Description A number of students sit in a circle facing their teacher in the center. Each student initially has an even number of pieces of candy. When the teacher blows a whistle, each stud原创 2014-10-31 20:49:25 · 390 阅读 · 0 评论