• <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)  編輯 收藏 引用 所屬分類: 題目分類:基礎/模擬
            奇米综合四色77777久久| 国产成人精品久久二区二区| 人妻中文久久久久| 亚洲AⅤ优女AV综合久久久| AV无码久久久久不卡蜜桃| 久久99精品国产99久久| 午夜精品久久影院蜜桃| 久久国产乱子伦精品免费强| 色婷婷久久久SWAG精品| 国产亚洲欧美成人久久片 | 久久人人超碰精品CAOPOREN| 久久久久人妻一区二区三区| 日韩精品久久久久久| 亚洲日本va中文字幕久久| 精品久久久久中文字| 久久99国产综合精品免费| 亚洲乱码日产精品a级毛片久久| 97久久天天综合色天天综合色hd| 久久久久一级精品亚洲国产成人综合AV区| 国产亚洲精久久久久久无码77777| 久久精品18| 国产 亚洲 欧美 另类 久久| 99久久成人国产精品免费| 香蕉久久夜色精品升级完成 | 亚洲精品tv久久久久久久久| 2021国内久久精品| 欧美伊人久久大香线蕉综合69| 青青草原1769久久免费播放| 亚洲精品无码久久一线| 久久综合亚洲色HEZYO社区 | 国产A级毛片久久久精品毛片| 久久久久久青草大香综合精品| 久久九九亚洲精品| 日本精品久久久久中文字幕| 久久免费精品一区二区| 丁香久久婷婷国产午夜视频| 国产精品99久久久久久董美香| 久久99精品九九九久久婷婷 | 日本强好片久久久久久AAA| 少妇高潮惨叫久久久久久| 国产精品美女久久久|