<pre id="bbfd9"><del id="bbfd9"><dfn id="bbfd9"></dfn></del></pre>

          <ruby id="bbfd9"></ruby><p id="bbfd9"><mark id="bbfd9"></mark></p>

          <p id="bbfd9"></p>

          <p id="bbfd9"><cite id="bbfd9"></cite></p>

            <th id="bbfd9"><form id="bbfd9"><dl id="bbfd9"></dl></form></th>

            <p id="bbfd9"><cite id="bbfd9"></cite></p><p id="bbfd9"></p>
            <p id="bbfd9"><cite id="bbfd9"><progress id="bbfd9"></progress></cite></p>

            心中寄托了對我的希望的作文

            時間:2025-10-03 08:19:54 希望 我要投稿

            心中寄托了對我的希望的作文

              給定字符串A和B,輸出A和B中的最大公共子串。

            心中寄托了對我的希望的作文

              比如A=”aocdfe” B=”pmcdfa” 則輸出”cdf”

              */

              /pic/p>

              #include

              #include

              #include

              char *commanstring(char shortstring[], char longstring[])

              {

              int i, j;

              char *substring=malloc(256);

              if(strstr(longstring, shortstring)!=NULL) /pic/p>

              return shortstring;

              for(i=strlen(shortstring)-1;i>0; i–) /pic/p>

              {

              for(j=0; j<=strlen(shortstring)-i; j++){

              memcpy(substring, &shortstring[j], i);

              substring[i]=’\0′;

              if(strstr(longstring, substring)!=NULL)

              return substring;

              }

              }

              return NULL;

              }

              main()

              {

              char *str1=malloc(256);

              char *str2=malloc(256);

              char *comman=NULL;

              gets(str1);

              gets(str2);

              if(strlen(str1)>strlen(str2)) /pic/p>

              comman=commanstring(str2, str1);

              else

              comman=commanstring(str1, str2);

              printf(“the longest comman string is: %s\n”, comman);

              }

            【心中寄托了對我的希望的作文】相關文章:

            守住心中的希望作文04-07

            筆寄托了我的情思作文(精選22篇)07-15

            夢在心中,希望常在06-08

            我真希望作文-希望作文06-12

            為了心中的希望作文(通用31篇)04-19

            我希望……作文02-23

            我希望的作文02-29

            我的希望作文【精選】05-17

            我希望作文01-07

            我的希望作文05-08

            • 相關推薦

                    <pre id="bbfd9"><del id="bbfd9"><dfn id="bbfd9"></dfn></del></pre>

                    <ruby id="bbfd9"></ruby><p id="bbfd9"><mark id="bbfd9"></mark></p>

                    <p id="bbfd9"></p>

                    <p id="bbfd9"><cite id="bbfd9"></cite></p>

                      <th id="bbfd9"><form id="bbfd9"><dl id="bbfd9"></dl></form></th>

                      <p id="bbfd9"><cite id="bbfd9"></cite></p><p id="bbfd9"></p>
                      <p id="bbfd9"><cite id="bbfd9"><progress id="bbfd9"></progress></cite></p>
                      飘沙影院