• <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 閱讀(439) 評論(0)  編輯 收藏 引用 所屬分類: 題目分類:基礎/模擬
            人人狠狠综合久久亚洲婷婷| 亚洲国产成人久久综合一区77| 久久狠狠高潮亚洲精品| 久久久这里有精品中文字幕| 久久免费香蕉视频| 久久香综合精品久久伊人| 日韩欧美亚洲综合久久影院d3| 国产成人久久精品一区二区三区| 国内精品久久久久久久久电影网| 久久久久黑人强伦姧人妻| 久久免费视频网站| 成人久久免费网站| 777午夜精品久久av蜜臀| 国产69精品久久久久9999APGF| 久久精品国产精品亚洲人人| 亚洲午夜无码AV毛片久久| 天堂久久天堂AV色综合| 国产精品成人99久久久久91gav| 精品国产婷婷久久久| 久久精品久久久久观看99水蜜桃 | 久久精品国产精品亚洲毛片| 国产成人无码精品久久久久免费| 久久成人影院精品777| 综合久久给合久久狠狠狠97色| 久久亚洲精品无码VA大香大香| 久久精品国产亚洲av高清漫画| 超级碰久久免费公开视频| 久久亚洲国产最新网站| 国产精品VIDEOSSEX久久发布 | 99久久婷婷国产综合亚洲| 狠狠色丁香久久婷婷综合_中| 久久成人永久免费播放| 色老头网站久久网| 狠狠色丁香婷综合久久| 91久久精品国产免费直播| 久久se精品一区精品二区| 亚洲va久久久噜噜噜久久狠狠| 国产综合久久久久| 99久久精品午夜一区二区| 久久99精品久久久久久不卡| 久久国产精品久久|