91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

詞典變位詞檢索系統(tǒng).rar】C實現(xiàn)的、就是每學期期末都會有的課程設計……

資源截圖

代碼片段和文件信息

#include
#include
#include
typedef?char?ElemType;
typedef?struct?Diction
{
ElemType?word[100];
struct?Diction?*next;
}Diction;
int?m;//記錄字符串長度?
int?n;//記錄字符串中的字符種類數(shù)?
char?map[256];//記錄是哪幾種字符
char?A[256];
int?count[256];//記錄每種字符有多少個?
void?Make_Map(char?*str)//統(tǒng)計字符串的相關信息?
{
int?s[256];
int?i;
memset(s0sizeof(s));
memset(count0sizeof(count));
m=strlen(str);
while(*str)
{
s[*str]++;
str++;
}
n=0;
for(i=0;i<256;i++)
if(s[i])
{
map[n]=i;
count[n]=s[i];
n++;
}
}
int?stack[1000];
Diction?*Find(int?depthDiction?*headDiction?*HEAD)
{
Diction?*p*p1*p2;
p=head;
if(depth==m)
{
int?i;
for(i=0;i A[i]=map[stack[i]];
A[i]=‘\0‘;
printf(“%s“A);
while(p!=NULL)
{
if(strcmp(p->wordA)==0)
break;
p=p->next;
}
if(p!=NULL)
{
p1=HEAD;
while(p1->next!=NULL)
{
p1=p1->next;
}
p2=(Diction?*)malloc(sizeof(Diction));
strcpy(p2->wordA);
p1->next=p2;
p2->next=NULL;
}
putchar(‘????‘);
}
else
{
int?i;
for(i=0;i if(count[i])
{
stack[depth]=i;
count[i]--;
Find(depth+1headHEAD);
count[i]++;
}
}
return?HEAD;
}
Diction?*read(void)
{
int?k;
Diction?*head;
Diction?*p1*p2;
FILE?*fp;
p1=p2=(Diction?*)malloc(sizeof(Diction));
k=0;
head=NULL;
if((fp=fopen(“diction.txt““rb“))==NULL)
{
printf(“打不開\n“);
return(head);
}
while(1)
{
if(fread(p1sizeof(Diction)1fp)==1)
{
k=k+1;
if(k==1)?head=p1;
else?p2->next=p1;
p2=p1;
p1=(Diction?*)malloc(sizeof(Diction));
}
else
break;

}
p2->next=NULL;
fclose(fp);
printf(“詞典中共%d個單詞\n“k);
return(head);
}
void?main()
{
int?x=0;
Diction?*head*q;
printf(“單詞變位詞查詢系統(tǒng)\n“);
head=read();
while(1)
{
Diction?*HEAD=(Diction?*)malloc(sizeof(Diction));
HEAD->next=NULL;
char?str[1000];
printf(“輸入單詞:“);
gets(str);
Make_Map(str);
printf(“此單詞的全排列為:\n“);
HEAD=Find(0headHEAD);
putchar(‘\n‘);
q=HEAD->next;
if(q==NULL)
{
printf(“沒有這個單詞\n“);
}
else
{
printf(“其中是單詞的有:\n“);
while(q!=NULL)
{
printf(“%s\n“q->word);
q=q->next;
}
}
printf(“輸入0繼續(xù)1退出\n“);
scanf(“%d“&x);
getchar();
map[256]=‘1‘;
A[256]=‘1‘;
if(x==1)
break;
}
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????2479??2009-01-11?16:18??詞典變位詞檢索系統(tǒng)程序\1.cpp

?????文件???????3341??2009-12-24?13:27??詞典變位詞檢索系統(tǒng)程序\1.dsp

?????文件????????510??2009-12-24?13:27??詞典變位詞檢索系統(tǒng)程序\1.dsw

?????文件??????58368??2009-12-24?13:27??詞典變位詞檢索系統(tǒng)程序\1.ncb

?????文件??????48640??2009-12-24?13:27??詞典變位詞檢索系統(tǒng)程序\1.opt

?????文件????????236??2009-12-24?13:27??詞典變位詞檢索系統(tǒng)程序\1.plg

?????文件?????196723??2009-12-24?08:38??詞典變位詞檢索系統(tǒng)程序\Debug\1.exe

?????文件?????194792??2009-12-24?08:38??詞典變位詞檢索系統(tǒng)程序\Debug\1.ilk

?????文件???????9936??2009-06-29?15:08??詞典變位詞檢索系統(tǒng)程序\Debug\1.obj

?????文件?????220396??2009-06-29?14:57??詞典變位詞檢索系統(tǒng)程序\Debug\1.pch

?????文件?????451584??2009-12-24?08:38??詞典變位詞檢索系統(tǒng)程序\Debug\1.pdb

?????文件??????58368??2009-12-24?13:27??詞典變位詞檢索系統(tǒng)程序\Debug\vc60.idb

?????文件??????53248??2009-06-29?14:57??詞典變位詞檢索系統(tǒng)程序\Debug\vc60.pdb

?????文件?????192634??2009-12-24?13:25??詞典變位詞檢索系統(tǒng)程序\Debug\輸入詞典.exe

?????文件?????192224??2009-12-24?13:25??詞典變位詞檢索系統(tǒng)程序\Debug\輸入詞典.ilk

?????文件???????5646??2009-03-27?08:48??詞典變位詞檢索系統(tǒng)程序\Debug\輸入詞典.obj

?????文件?????220396??2009-03-27?08:48??詞典變位詞檢索系統(tǒng)程序\Debug\輸入詞典.pch

?????文件?????386048??2009-12-24?13:25??詞典變位詞檢索系統(tǒng)程序\Debug\輸入詞典.pdb

?????文件???????1352??2009-12-24?13:27??詞典變位詞檢索系統(tǒng)程序\diction.txt

?????文件????????866??2008-12-30?15:04??詞典變位詞檢索系統(tǒng)程序\輸入詞典.cpp

?????文件???????3427??2009-12-24?13:25??詞典變位詞檢索系統(tǒng)程序\輸入詞典.dsp

?????文件????????524??2009-12-24?13:27??詞典變位詞檢索系統(tǒng)程序\輸入詞典.dsw

?????文件??????50176??2009-12-24?13:27??詞典變位詞檢索系統(tǒng)程序\輸入詞典.ncb

?????文件??????48640??2009-12-24?13:27??詞典變位詞檢索系統(tǒng)程序\輸入詞典.opt

?????文件????????250??2009-12-24?13:26??詞典變位詞檢索系統(tǒng)程序\輸入詞典.plg

?????目錄??????????0??2011-12-18?17:56??詞典變位詞檢索系統(tǒng)程序\Debug

?????目錄??????????0??2011-12-18?17:56??詞典變位詞檢索系統(tǒng)程序

-----------?---------??----------?-----??----

??????????????2400804????????????????????27



............此處省略0個文件信息

評論

共有 條評論