• <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久久久久 | 亚洲国产一成久久精品国产成人综合 | 亚洲精品乱码久久久久久蜜桃图片| 久久久一本精品99久久精品66 | 久久久国产精品亚洲一区 | 久久大香香蕉国产| 亚洲国产日韩欧美综合久久| 国产精品va久久久久久久| 久久久久久亚洲AV无码专区| 亚洲国产精品嫩草影院久久| 91精品国产色综久久| 国产精品9999久久久久| 久久久久久久久久久| 亚洲国产精品狼友中文久久久| 狠狠狠色丁香婷婷综合久久俺| 99久久国产亚洲高清观看2024 | 精品欧美一区二区三区久久久| 欧洲精品久久久av无码电影| 亚洲乱码中文字幕久久孕妇黑人| 人妻精品久久无码区| 中文字幕无码免费久久| 久久亚洲精品国产精品| 青青久久精品国产免费看| 亚洲狠狠婷婷综合久久久久| 97久久精品人人澡人人爽| 97久久精品午夜一区二区| 久久久久人妻一区精品色| 99久久免费国产特黄| 91亚洲国产成人久久精品|