• <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 閱讀(443) 評論(0)  編輯 收藏 引用 所屬分類: 題目分類:基礎/模擬
            精品久久久久久久久中文字幕| 一本一道久久精品综合| 欧美亚洲日本久久精品| 伊人久久亚洲综合影院| 久久人妻少妇嫩草AV无码专区| 久久99国产精品99久久| 久久久久亚洲AV成人网人人软件 | 无码AV波多野结衣久久| 精品国产VA久久久久久久冰| 国产精品丝袜久久久久久不卡| 久久五月精品中文字幕| 久久亚洲私人国产精品| 久久久久国产一区二区三区| 日本久久久久亚洲中字幕| 久久综合给合综合久久| 91精品国产高清91久久久久久| 久久影院亚洲一区| 一本一道久久精品综合| 国产精品99精品久久免费| 香蕉久久AⅤ一区二区三区| 国产精品久久久久影视不卡| 一本色道久久88综合日韩精品| 一级做a爰片久久毛片人呢| 久久天天躁狠狠躁夜夜96流白浆| 久久久精品国产Sm最大网站| 国产亚洲美女精品久久久久狼| 久久无码AV一区二区三区| 精品99久久aaa一级毛片| 久久精品视频免费| 精品午夜久久福利大片| 午夜精品久久久久久久| 狠狠精品久久久无码中文字幕| 亚洲精品97久久中文字幕无码| 大美女久久久久久j久久| 亚洲国产成人久久精品影视| 久久精品视频网| 伊人久久大香线蕉影院95| 国产精品久久99| 国产精品嫩草影院久久| 日本精品久久久久影院日本| 欧美精品九九99久久在观看|