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

  • 大小: 0.29M
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-02
  • 語言: 其他
  • 標簽: 其他??

資源簡介

關于nfa確定化.zip

資源截圖

代碼片段和文件信息

#include?
#include?
#include?
#define?MAX_LINE?1024
char??in[MAX_LINE][MAX_LINE];
char?now[MAX_LINE][MAX_LINE][MAX_LINE];
int?flag_in[MAX_LINE][MAX_LINE];//沒用到,可以不要?
char?now_state[MAX_LINE];
char?state[MAX_LINE];

char?alphabet=‘A‘;
int?length=0;
int?l_now=0;
int?l_state=0;


void?getfile(){
char?buf[MAX_LINE];//緩沖區(qū)
int?len;//行字符個數(shù)
?FILE?*fp;????????????//文件指針
?if((fp?=?fopen(“64-7(1).txt““r“))?==?NULL)
?{
?printf(“fail?to?read“);
?exit?(1)?;
?}
?while(fgets(bufMAX_LINEfp)?!=?NULL){
??len?=?strlen(buf);
??buf[len-1]?=?‘\0‘;??//去掉換行符
??//printf(“%s?%d?\n“buflen);
??strcpy(in[length++]buf);
?}
?fclose(fp);
}
void?print(){
printf(“\n\nnow數(shù)組的結果是:\n“);
for(int?i=0;i for(int?j=0;j<4;j++){
printf(“%s?“now[i][j]);
}
printf(“\n“);
}
}
//flag位用來記載上一步是不是q如果是q就可以讓a或b走一步,
//如果不是q說明是a或b,因為a或b只能走一次,所以這次不能走?
//past_flag位用來記載曾經(jīng)有沒有一步是a或b?
char?*?dfs_d(char?pchar?qbool?flagbool?past_flag){
?printf(“\n本次進行遞歸的是:%c??%c\n“pq);?
int?xy;
if(q==‘a(chǎn)‘){
x=4;
}else?if(q==‘b‘){
x=6;
}
for(int?i=1;i if(p==in[i][0]){
y=i;
}
}
if(in[y][2]!=‘#‘){
flag_in[y][2]=1;
char?str[3];
str[0]=in[y][2];
str[1]=‘‘;
str[2]=‘\0‘;
if(past_flag==true){
strcat(now_statestr);
}
dfs_d(in[y][2]qtruepast_flag);
}
if(in[y][x]!=‘#‘/*&&flag_in[y][x]==0*/&&flag==true&&past_flag==false){
flag_in[y][x]=1;
char?str[3];
str[0]=in[y][x];
str[1]=‘‘;
str[2]=‘\0‘;
strcat(now_statestr);
dfs_d(in[y][x]qfalsetrue);
}
printf(“\n此次遞歸的結果為:%s\n“now_state);
return?now_state;
}

char?*?dfs(char?*?statechar?s){
memset(flag_in0sizeof(flag_in));

//printf(“now_state的結果是:%s“now_state);
/*
for(int?i=0;i<10;i++){
for(int?j=0;j<10;j++){
printf(“%d“flag_in[i][j]);
}
printf(“\n“);
}
*/
printf(“\ndfs讀入結果為:%s??%c\n“states);
char??now_out[MAX_LINE];
strcpy(now_out“{“);
for(int?i=0;state[i]!=‘\0‘;i++){
memset(now_state‘\0‘sizeof(now_state));
if(state[i]!=‘{‘&&state[i]!=‘}‘&&state[i]!=‘‘){

printf(“\n此次dfs_d的是:%c\n“state[i]);
//printf(“\n此時的now_out是:%s\n“now_out);
strcat(now_outdfs_d(state[i]struefalse));
}
}
int?l_str=strlen(now_out);
if(l_str==1){
now_out[l_str]=‘}‘;
now_out[l_str+1]=‘\0‘;
}else{
now_out[l_str-1]=‘}‘;
now_out[l_str]=‘\0‘;
}
printf(“\n此次dfs_d的結果是:%s\n“now_out);

//字符串排序去重函數(shù)?


char?hash[100];
int?value[100];
memset(hash‘\0‘sizeof(hash));
memset(value0sizeof(value));
strcpy(hash“x0123456789y“);
for(int?i=0;i for(int?j=0;j<12;j++){
if(now_out[i]==hash[j]){
value[j]=1;
}
}
}
char??now_ans[100];
strcpy(now_ans“{“);
for(int?i=0;i<12;i++){
if(value[i]==1){
char?ss[3];
ss[0]=hash[i];
ss[1]=‘‘;
ss[2]=‘\0‘;
strcat(now_ansss);
}
}
int?l_now_ans=strlen(now_ans);
if(l_str==1){
now_ans[l_now

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-10-27?17:31??關于nfa確定化\
?????文件????????5131??2019-10-27?17:30??關于nfa確定化\4.1.png
?????文件???????10025??2019-10-27?17:30??關于nfa確定化\4.2.png
?????文件???????55235??2019-10-27?17:29??關于nfa確定化\4.png
?????文件??????????63??2019-10-26?18:04??關于nfa確定化\4.txt
?????文件??????????63??2019-10-27?16:20??關于nfa確定化\4s.txt
?????文件???????80250??2019-10-27?13:37??關于nfa確定化\64-14.jpg
?????文件??????????45??2019-10-27?13:39??關于nfa確定化\64-14.txt
?????文件??????????72??2019-10-27?16:30??關于nfa確定化\64-7(1).txt
?????文件???????88611??2019-10-27?16:47??關于nfa確定化\64-7.jpg
?????文件????????5484??2019-10-27?17:12??關于nfa確定化\nfa確定化4.cpp
?????文件??????137983??2019-10-27?17:14??關于nfa確定化\nfa確定化4.exe
?????文件????????5519??2019-10-27?17:14??關于nfa確定化\nfa確定化(最終版).cpp
?????文件??????137495??2019-10-27?17:14??關于nfa確定化\nfa確定化(最終版).exe
?????文件?????????290??2019-10-27?17:32??關于nfa確定化\說明.txt

評論

共有 條評論