摘要: View Code #include <stdio.h>#include <string.h>int start,end;char s[105];void p(){ int i=0; for (i=start;i<=end;i++)printf("%c",s[i]);}int main(){ int n,i,j,k,l,pre_ans,suf_ans; int pre_ar[5]={4,4,3,2,2},suf_ar[5]={2,3,3,1,4}; char prefix[5][5]={"anti","post&q 阅读全文
posted @ 2011-11-23 20:30 104_gogo 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 题意:有n个单词,要求每个单词出现的频率(次数/n),并把这些单词以字典序输出View Code #include <stdio.h>#include <string.h>#include <iostream>#include <algorithm>using namespace std;struct Tree{ int number; char name[35]; Tree *l,*r; Tree() { l=r=0; }}*root;int n;char s[35];void init(Tree *&t,char *s){ if(t= 阅读全文
posted @ 2011-11-23 20:28 104_gogo 阅读(144) 评论(0) 推荐(0) 编辑