2015年9月28日
摘要: /**口袋里有红、黄、蓝、白、黒5种颜色的球若干,每次从口袋中先后取出3个球,问得到3种不同颜色的球的可能取法,输出每种排列的情况**/#include #include int main(){ enum Color {red,yellow,blue,white,black}... 阅读全文
posted @ 2015-09-28 20:15 cnxo 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 长度为n的环状串有n种表示法,分别为从某个位置开始顺时针得到。 求字典序最小的,也就是最小表示#include #include #define maxn 105int less(char *s,int p,int q){ int i,n; n=strlen(s); f... 阅读全文
posted @ 2015-09-28 19:32 cnxo 阅读(176) 评论(0) 推荐(0) 编辑