• <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>

            poj 2726

             

            #include <iostream>
            #include 
            <algorithm>
            #define MAXN 10005

            using namespace std;

            struct node
            {
                
            int a;
                
            int b;
            }
            ;
            //node _node[MAXN];
            bool op(node _a,node _b);
            node _n_1[MAXN];
            node _n_2[MAXN];
            int main()
            {
                freopen(
            "acm.acm","r",stdin);
                
            int n;
                
            int i;
                
            int j;
                
            int ans;
                
            int index_1;
                
            int index_2;
                
            int cur;
                
            while(cin>>n,n)
                
            {
                    index_1 
            = 0;
                    index_2 
            = 0;
                    ans 
            = 0;
                    cur 
            = -1;
                    
            for(i = 0; i < n; ++ i)
                    
            {
                        
            int a;
                        
            int b;
                        scanf(
            "%d",&a);
                        scanf(
            "%d",&b);
                        _n_1[index_1].a 
            = a;
                        _n_1[index_1].b 
            = b;
                        
            ++ index_1;
                    }

                    sort(_n_1,_n_1
            +index_1,op);
                    
            if(index_1 > 0)
                    
            {
                        
            ++ ans;
                        cur 
            = _n_1[0].a;
                    }

                    
            for(i = 1; i < index_1; ++ i)
                    
            {
                        
            if(_n_1[i].a < cur)
                        
            {
                            
            ++ ans;
                            cur 
            = _n_1[i].a;
                        }

                    }


                    cout
            <<ans<<endl;
                }

            }


            bool op(node _a,node _b)
            {
                
            if(_a.b == _b.b)
                
            {
                    
            return _a.a < _b.a;
                }

                
            return _a.b < _b.b;
            }



             

            posted on 2010-06-09 21:44 成大才子 閱讀(248) 評(píng)論(0)  編輯 收藏 引用

            <2010年6月>
            303112345
            6789101112
            13141516171819
            20212223242526
            27282930123
            45678910

            導(dǎo)航

            統(tǒng)計(jì)

            公告

            關(guān)于更多關(guān)于成大才子,請(qǐng)?jiān)L問(wèn)http://hi.baidu.com/成大才子

            常用鏈接

            留言簿(1)

            隨筆檔案

            文章分類

            文章檔案

            鏈接

            搜索

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

            色偷偷偷久久伊人大杳蕉| 久久久WWW免费人成精品| 日日狠狠久久偷偷色综合96蜜桃| 久久棈精品久久久久久噜噜| 久久婷婷五月综合国产尤物app| 久久久受www免费人成| 精品久久久久一区二区三区| 天天久久狠狠色综合| 久久精品国产亚洲网站| 狠狠色丁香久久综合婷婷| www.久久精品| 99国内精品久久久久久久| 国产亚洲色婷婷久久99精品91| 久久99精品久久久久久野外| 国产高清国内精品福利99久久| 青青青伊人色综合久久| 久久久久国产精品嫩草影院| 国产精品免费久久| 久久天天躁狠狠躁夜夜av浪潮| 日本加勒比久久精品| 久久久久人妻一区二区三区| 99久久国产精品免费一区二区| 久久丫精品国产亚洲av不卡| 狠狠久久亚洲欧美专区 | 亚洲午夜久久久影院| 漂亮人妻被黑人久久精品| 精品久久777| 香蕉久久夜色精品国产2020 | 99久久免费只有精品国产| 99久久国产免费福利| 久久精品国产清自在天天线 | 亚洲精品无码久久久久去q| 精品无码久久久久久尤物| 国产午夜精品理论片久久| 久久婷婷五月综合色奶水99啪| 久久精品国产亚洲av日韩| 久久久久亚洲精品中文字幕| 亚洲∧v久久久无码精品| 久久久久亚洲AV成人网人人网站| 无码人妻久久一区二区三区| 亚洲国产天堂久久综合网站 |