• <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 閱讀(407) 評論(0)  編輯 收藏 引用 所屬分類: 題目分類:基礎/模擬
            精品无码久久久久久久久久| 久久99精品国产99久久| 久久精品无码专区免费| 欧美与黑人午夜性猛交久久久| 国内精品久久久久久不卡影院| 久久se精品一区精品二区国产| 一本色道久久88综合日韩精品| 青草国产精品久久久久久| 97精品国产97久久久久久免费| 久久久综合香蕉尹人综合网| 婷婷久久五月天| 99999久久久久久亚洲| 中文成人无码精品久久久不卡 | 狠狠色综合久久久久尤物| 亚洲欧美成人久久综合中文网 | 青青草国产精品久久| 亚洲精品无码久久久久AV麻豆| 久久777国产线看观看精品| 亚洲伊人久久成综合人影院| 国产V综合V亚洲欧美久久| 狠狠色丁香久久婷婷综合_中 | 青青草原1769久久免费播放| A级毛片无码久久精品免费 | 久久精品国产99国产精品 | 久久久久亚洲AV综合波多野结衣| 蜜臀av性久久久久蜜臀aⅴ| 久久亚洲视频| 久久影视国产亚洲| 爱做久久久久久| 97精品伊人久久久大香线蕉| 国产精品久久国产精麻豆99网站| 久久久精品国产免大香伊 | 久久综合九色综合久99| 大蕉久久伊人中文字幕| 久久99国产精品久久久| aaa级精品久久久国产片| 婷婷五月深深久久精品| 久久WWW免费人成一看片| 欧美日韩久久中文字幕| 久久乐国产综合亚洲精品| 亚洲国产精品综合久久一线|