• <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
            Tha task of this problem is to count the number of words of one line.
            My solution is to insert a space into the beginning of the line.
            Here is my code:
            #include<stdio.h>
            #include
            <iostream>
            #include
            <string>
            using namespace std;
            bool letter(char c)
            {
                
            if((c>='a'&&c<='z')||(c>='A'&&c<='Z'))
                    
            return true;
                
            return false;
            }

            int ans;
            string s;

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

                
            while(getline(cin,s))
                {
                    ans
            =0;
                    s.insert(
            0," ");
                    
            for(int i=0;i<s.length()-1;i++)
                        
            if(!letter(s[i])&&letter(s[i+1]))
                            ans
            ++;
                    cout
            <<ans<<endl;
                }
            return 0;
            }
            posted on 2011-01-23 16:51 lee1r 閱讀(434) 評論(0)  編輯 收藏 引用 所屬分類: 題目分類:基礎(chǔ)/模擬
            国产成人无码精品久久久性色| 久久99精品国产99久久6| 久久久久精品国产亚洲AV无码| 久久综合成人网| 无码国内精品久久综合88| 国产精品久久99| 久久成人精品| 色婷婷综合久久久久中文一区二区| 亚洲国产精品一区二区久久| 亚洲国产精品综合久久网络| 国产精品99久久免费观看| 国内精品伊人久久久影院| 99久久777色| 热综合一本伊人久久精品| 久久久精品午夜免费不卡| 精品久久久中文字幕人妻| 色偷偷久久一区二区三区| 狠狠色丁香婷婷久久综合| 久久精品国产亚洲5555| 色综合久久最新中文字幕| 久久久亚洲欧洲日产国码二区| 一日本道伊人久久综合影| 久久综合给合综合久久| 久久久久久国产精品无码下载| 久久婷婷国产剧情内射白浆| 久久精品视频一| 亚洲精品国精品久久99热| 久久性生大片免费观看性| 国产—久久香蕉国产线看观看| 国产V综合V亚洲欧美久久| 2020久久精品国产免费| 国产一区二区三区久久精品| 久久久久久久久无码精品亚洲日韩 | 久久久久久亚洲精品影院| 精品久久久久久无码人妻热 | 亚洲人成精品久久久久| 中文国产成人精品久久不卡| 久久九九兔免费精品6| 亚洲中文字幕无码久久精品1 | 日韩欧美亚洲国产精品字幕久久久 | 狠狠色丁香婷婷综合久久来来去|