• <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
            RE一次,WA兩次,結果是因為提交錯了題目。
            以下是我的代碼:
            #include<iostream>
            #include
            <sstream>
            #include
            <vector>
            #include
            <string>
            #include
            <algorithm>
            #include
            <cstdio>
            using namespace std;

            struct Type
            {
                Type():AC(
            false),tried(0) {}
                
                
            bool AC;
                
            int tried,AC_time;
            };

            struct Type2
            {
                Type2(
            int aa,int bb,int cc):id(aa),solved(bb),total_time(cc) {}
                
                
            int id;
                
            int solved;
                
            int total_time;
            };
            bool operator<(const Type2 &a,const Type2 &b)
            {
                
            return ((a.solved>b.solved) ||
                        (a.solved
            ==b.solved && a.total_time<b.total_time) ||
                        (a.solved
            ==b.solved && a.total_time==b.total_time && a.id<b.id));
            }

            int main()
            {
            #ifndef ONLINE_JUDGE
                freopen(
            "data.in","r",stdin);
            #endif
                
                
            int T;
                scanf(
            "%d",&T);
                cin.
            get();cin.get();
                
                
            bool first_case(true);
                
            while(T--)
                {
                    
            if(first_case)
                        first_case
            =false;
                    
            else
                        printf(
            "\n");
                    
                    Type r[
            107][17];
                    
            bool be[107]={false};
                    
                    
            string in;
                    
            while(getline(cin,in&& !in.empty())
                    {
                        
            int id,prob,tm;
                        
            char state;
                        istringstream(
            in)>>id>>prob>>tm>>state;
                        
                        be[id]
            =true;
                        
            if(state=='R' || state=='U' || state=='E' || r[id][prob].AC)
                            
            continue;
                        
            if(state=='C')
                        {
                            r[id][prob].AC
            =true;
                            r[id][prob].AC_time
            =tm+20*r[id][prob].tried;
                        }
                        
            else
                            r[id][prob].tried
            ++;
                    }
                    vector
            <Type2> a;
                    
            for(int i=1;i<=100;i++)
                        
            if(be[i])
                        {
                            
            int t1(0),t2(0);
                            
            for(int j=1;j<=9;j++)
                                
            if(r[i][j].AC)
                                {
                                    t1
            ++;
                                    t2
            +=r[i][j].AC_time;
                                }
                            a.push_back(Type2(i,t1,t2));
                        }
                    sort(a.begin(),a.end());
                    
                    
            for(int i=0;i<a.size();i++)
                        printf(
            "%d %d %d\n",a[i].id,a[i].solved,a[i].total_time);
                }
                
                
            return 0;
            }
            posted on 2011-09-06 14:08 lee1r 閱讀(408) 評論(0)  編輯 收藏 引用 所屬分類: 題目分類:基礎/模擬
            欧美亚洲国产精品久久| 一级女性全黄久久生活片免费 | 久久99精品久久久久婷婷| 性欧美丰满熟妇XXXX性久久久| 亚洲国产一成人久久精品| 亚洲色大成网站www久久九 | 中文成人无码精品久久久不卡| 久久久无码精品亚洲日韩软件| 久久99热这里只有精品66| 亚洲中文久久精品无码| 久久久久免费精品国产| 伊人色综合九久久天天蜜桃| 熟妇人妻久久中文字幕| 伊人丁香狠狠色综合久久| 精品综合久久久久久98| 青青青青久久精品国产h| 中文精品久久久久人妻| 91久久精品电影| 久久精品九九亚洲精品| 97视频久久久| 亚洲精品tv久久久久久久久久| 国产一级持黄大片99久久| 日韩人妻无码一区二区三区久久99| 女人香蕉久久**毛片精品| 麻豆亚洲AV永久无码精品久久| 欧美久久亚洲精品| 国产亚洲色婷婷久久99精品91| 99久久久精品免费观看国产| 大香伊人久久精品一区二区| 久久久99精品一区二区 | 久久久久亚洲精品中文字幕| 高清免费久久午夜精品| 97精品国产97久久久久久免费 | 伊人久久大香线蕉成人| 久久精品一区二区影院| 久久久国产精品网站| 国产毛片久久久久久国产毛片| 91精品国产综合久久精品| 99re这里只有精品热久久| 波多野结衣中文字幕久久| 国产高潮国产高潮久久久|