摘要: 250pt题意: 给定字符串,求使至多有一对相邻字符不同的排列数。分析: 至多有一对就说明至多只有两种字符,答案只可能是0(多于两种字符),1(一种字符),2(两种字符)。View Code #include <cstdlib> #include <cctype> #include <cstring> #include <cstdio> #include <cmath> #include <algorithm> #include <vector> #include <string> #include 阅读全文
posted @ 2012-08-15 10:16 蚀 阅读(177) 评论(0) 推荐(0) 编辑