• <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>
            心如止水
            Je n'ai pas le temps
            posts - 400,comments - 130,trackbacks - 0
            STL還是需要去熟悉啊~現在不是OI了!但是那么多的函數怎么記吶!苦惱。
            以下是我的代碼:
            #include<iostream>
            #include
            <string>
            #include
            <cstdio>
            using namespace std;

            int main()
            {
                
            /*
                freopen("autoedit.in","r",stdin);
                freopen("autoedit.out","w",stdout);
                //
            */

                
            int n;
                
            while(cin>>&& n)
                {
                    getchar();
                    
            string origin[17],replace[17];
                    
            for(int i=1;i<=n;i++)
                    {
                        getline(cin,origin[i]);
                        getline(cin,replace[i]);
                    }
                    
            string text;
                    getline(cin,text);

                    
            for(int i=1;i<=n;i++)
                    {
                        
            int find_result;
                        
            while((find_result=text.find(origin[i]))!=string::npos)
                        {
                            text.erase(text.begin()
            +find_result,text.begin()+find_result+origin[i].size());
                            text.insert(find_result,replace[i]);
                        }
                    }

                    cout
            <<text<<endl;
                }

                
            return 0;
            }
            posted on 2011-04-07 22:58 lee1r 閱讀(578) 評論(3)  編輯 收藏 引用 所屬分類: 題目分類:字符串處理

            FeedBack:
            # re: UVa 10115 Automatic Editing
            2011-04-22 22:04 | sai
            我有string里面的replace函數RE。。不知道為啥。。  回復  更多評論
              
            # re: UVa 10115 Automatic Editing
            2011-04-22 23:01 | lee1r
            @sai
            我對STL現在還不是很熟悉,參考一下相關手冊,看看replace會不會越界訪問string中不存在的位置。  回復  更多評論
              
            # re: UVa 10115 Automatic Editing
            2012-06-24 21:21 | Backer
            stl不需要記,看函數名,翻源代碼看就OK(如果你的編譯器是MinGW的話)  回復  更多評論
              
            久久国产成人午夜AV影院| 2021久久国自产拍精品| 欧美伊人久久大香线蕉综合69 | 99久久精品费精品国产一区二区| 久久午夜伦鲁片免费无码| 久久亚洲精品视频| 偷窥少妇久久久久久久久| 97久久久精品综合88久久| 色欲综合久久躁天天躁| 狠狠色丁香婷婷久久综合不卡| 久久国产精品免费一区| 人妻无码久久一区二区三区免费| 9999国产精品欧美久久久久久 | 日韩精品久久无码中文字幕| 久久青青草原国产精品免费| 人妻无码αv中文字幕久久 | 色欲久久久天天天综合网| 久久最新精品国产| 久久亚洲精品国产精品| 久久这里有精品| 久久亚洲中文字幕精品一区四 | 精品久久久久久亚洲| 欧美日韩精品久久久久| 久久久久综合中文字幕| 久久综合狠狠综合久久激情 | 欧美亚洲日本久久精品| 精品国产热久久久福利| 精品久久一区二区| 亚洲一本综合久久| 久久久久夜夜夜精品国产| 国产精品久久久久…| 成人国内精品久久久久影院| 久久久av波多野一区二区| 久久精品中文无码资源站| 7777精品久久久大香线蕉| 99精品国产99久久久久久97| 久久人人青草97香蕉| 久久精品日日躁夜夜躁欧美| 久久亚洲熟女cc98cm| 久久人人爽人人爽人人片AV麻烦 | 免费观看久久精彩视频 |