• <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久久国产综合精品宅男自 | 久久99久久99小草精品免视看| 色综合久久无码五十路人妻| 亚洲精品无码久久千人斩| 国产精品久久午夜夜伦鲁鲁| 久久本道综合久久伊人| 久久久久亚洲AV无码专区首JN| 精品国产一区二区三区久久| 久久久久99精品成人片| 久久精品99久久香蕉国产色戒| 99久久精品国产毛片| 久久人爽人人爽人人片AV| 人妻中文久久久久| 久久福利青草精品资源站| 亚洲综合伊人久久综合| 精品久久久久久久久久中文字幕| 色欲综合久久中文字幕网| 最新久久免费视频| 久久e热在这里只有国产中文精品99 | 99久久国产综合精品麻豆| 波多野结衣久久精品| 女同久久| 日韩欧美亚洲国产精品字幕久久久| 色综合久久综合网观看| 99国产欧美精品久久久蜜芽| 无码专区久久综合久中文字幕| 久久久精品国产| 久久久国产99久久国产一| 久久笫一福利免费导航| 亚洲精品综合久久| 日韩久久无码免费毛片软件| 欧美久久亚洲精品| 久久久精品波多野结衣| 久久久久久国产精品美女 | 少妇无套内谢久久久久| 色婷婷久久综合中文久久一本| 久久久久久亚洲精品不卡| 久久久人妻精品无码一区 | 一本久久知道综合久久| 久久亚洲美女精品国产精品| 久久精品国产网红主播|