• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            The Fourth Dimension Space

            枯葉北風(fēng)寒,忽然年以殘,念往昔,語默心酸。二十光陰無一物,韶光賤,寐難安; 不畏形影單,道途阻且慢,哪曲折,如渡飛湍。斬浪劈波酬壯志,同把酒,共言歡! -如夢令

            數(shù)學(xué)建模的一個小程序

            //數(shù)學(xué)建模
            //2010年8月21日21:55:29

            #include<iostream>
            #include
            <algorithm>
            #include
            <vector>
            #include
            <sstream>
            #include
            <string>
            using namespace std;
            int const maxn=10000;
            char in[100000];

            vector
            <string>mm[maxn];
            int cnt=0;


            bool isdigt(char a)
            {
                
            if(a>='0'&&a<='9')
                    
            return true;
                
            else
                    
            return false;
            }
             

            void predo()
            {
                
            int len=strlen(in);
                
            for(int i=0;i<len;i++)
                
            {
                    
            if(!isdigt(in[i]))
                        
            in[i]=' ';
                }

            }


            string ans;
            void dfs(int k,string str)
            {
                
            if(k==cnt)
                
            {
                    cout
            <<str<<endl;
                    
            return;
                }

                
            int n=mm[k].size();
                
            for(int i=0;i<n;i++)
                
            {
                    
            if(k!=0)
                    
            //cout<<"-"<<mm[k][i];
                    {
                        str
            +="-";
                        str
            +=mm[k][i];
                    }

                    
            else
                    
            //cout<<mm[k][i];
                        str+=mm[k][i];
                    dfs(k
            +1,str);

                    
            if(k!=0)
                    
            //cout<<"-"<<mm[k][i];
                    {
                        str
            =str.substr(0,str.length()-mm[k][i].length()-1);
                    }

                    
            else
                    
            //cout<<mm[k][i];
                    str=str.substr(0,str.length()-mm[k][i].length());

                }

            }







            int main()
            {
                freopen(
            "IN.txt","r",stdin);
                freopen(
            "OUT.txt","w",stdout);
                cnt
            =0;
                ans
            ="";
                
            while(cin.getline(in,100000))
                
            {
                    predo();
                    
                    
            //debug
                    
            //printf("%s\n",in);
                    
            //system("pause");
                    
            // 
                    istringstream t(in);
                    
            string tem;
                    
            while(t>>tem)
                    
            {
                        mm[cnt].push_back(tem);
                    }

                    cnt
            ++;

                }

                
            //debug
                /*
                printf("cnt = %d\n",cnt);
                for(int i=0;i<cnt;i++)
                {
                    for(int j=0;j<mm[i].size();j++)
                    {
                        cout<<mm[i][j]<<' ';
                    }
                    cout<<endl;
                }
                system("pause");
                
            */


                
                dfs(
            0,ans);
                
            return 0;
            }


            第一組
            0567, 0042, 0025
            1487
            0303, 0302
            0566
            0436, 0438, 0437, 0435
            0392, 0394, 0393, 0391
            0386, 0388, 0387, 0385
            3068, 0617, 0619, 0618, 0616
            1279
            2057, 0721, 0722, 0720
            0070, 2361, 3721
            0609, 0608
            2633, 0399, 0401, 0400
            3321, 2535, 2464
            3329, 2534
            3506, 0167, 0168
            0237, 0239, 0238, 0236, 0540
            0668
            0180, 0181
            2079, 2933, 1919, 1921, 1920
            0465, 0467, 0466, 0464
            3457

            第二組
            0537, 3580
            0526, 0528, 0527, 0525
            3045, 0605, 0607
            0609, 0608
            0087, 0088, 0086
            0855, 0856, 0854, 0857
            0631, 0632, 0630
            3874, 1426, 1427
            0211, 0539, 0541, 0540
            0978, 0497, 0498
            0668
            1894, 1896, 1895
            1104, 0576, 0578, 0577
            3010, 0583, 0582
            3676, 0427, 0061, 0060
            1961, 2817, 0455, 0456
            3262, 0622
            1956, 0289, 0291

            posted on 2010-08-21 21:56 abilitytao 閱讀(384) 評論(0)  編輯 收藏 引用


            只有注冊用戶登錄后才能發(fā)表評論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            精品久久久久久久久久中文字幕 | 久久国产精品久久精品国产| 伊人久久大香线蕉无码麻豆| 中文国产成人精品久久亚洲精品AⅤ无码精品 | 看全色黄大色大片免费久久久| 亚洲av伊人久久综合密臀性色 | 青草久久久国产线免观| 久久天天婷婷五月俺也去| 亚洲国产精品久久久天堂| 久久精品国产精品亚洲精品 | 国产亚洲精品久久久久秋霞| 久久夜色精品国产噜噜噜亚洲AV| 丰满少妇人妻久久久久久| 久久久久久av无码免费看大片| 日韩亚洲国产综合久久久| 久久99精品久久久久久久久久| 国内精品欧美久久精品| 亚洲AV日韩精品久久久久 | 囯产精品久久久久久久久蜜桃| 99久久国语露脸精品国产| 日本久久中文字幕| 国产午夜精品久久久久免费视 | 国产91久久综合| 久久偷看各类wc女厕嘘嘘| 久久综合久久伊人| 久久综合久久综合久久| 亚洲欧美日韩中文久久| 久久影院午夜理论片无码| 日本精品久久久久中文字幕8 | 亚洲国产另类久久久精品小说| 久久精品国产亚洲Aⅴ蜜臀色欲| 久久成人国产精品| 精品久久亚洲中文无码| 久久精品夜色噜噜亚洲A∨| 精品久久久久久综合日本| 97精品久久天干天天天按摩| 久久精品国产男包| 久久久久久免费视频| 亚洲欧美一区二区三区久久| 欧美色综合久久久久久| 久久亚洲精品无码观看不卡|