- 博客(3)
- 收藏
- 关注
原创 Sicily: Candy Sharing Game
题目:DescriptionA 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
389
原创 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
4522
4
翻译 枚举类(Enumerated types)介绍
一、枚举类(Enumerated types)是一种用户自定义的类型,在定义时用户设置一系列标识符(identifers)(被称为enumerators 枚举子)作为类型的可赋值。枚举类的对象可以选这些enumerator作为其的值。语法:enum type_name { value1, value2, value3, . .} object_names;
2014-10-14 22:00:22
1539
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人