摘要: 1、给一个数字字符串s,可以把它的最后一个字符放到最前面变为另一个数字,直到又变为原来的s。求这个过程中比原来的数字小的、相等的、大的数字各有多少。例如:字符串123,变换过程:123 -> 312 -> 231 -> 123因为:312>123, 231>123, 123=123所以答案是:0 1... 阅读全文
posted @ 2015-11-06 20:35 gongpixin 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 1、输入若干行树名,输入结束后,按字典序输出树名及其所占百分比。2、多种方法:map,trie,BST3、map:#include#include#include#includeusing namespace std;int main(){ maph; string s; int ... 阅读全文
posted @ 2015-11-06 12:43 gongpixin 阅读(337) 评论(0) 推荐(0) 编辑