• <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)  編輯 收藏 引用 所屬分類: 題目分類:基礎/模擬
            久久久久亚洲Av无码专| 91精品国产综合久久四虎久久无码一级| 亚洲国产精品一区二区久久| 国产精品欧美亚洲韩国日本久久 | 亚洲AV无码久久精品色欲| 亚洲中文精品久久久久久不卡| 性欧美大战久久久久久久久| 香蕉久久一区二区不卡无毒影院| 婷婷久久综合九色综合九七| 97久久久精品综合88久久| 亚洲午夜无码AV毛片久久| 久久无码高潮喷水| 欧美久久综合性欧美| 777午夜精品久久av蜜臀| 国产成人无码精品久久久免费| 久久亚洲国产成人影院| 国内精品久久久久国产盗摄| 国产成人精品综合久久久久| 精品久久久无码中文字幕天天| 一本色综合网久久| 中文国产成人精品久久亚洲精品AⅤ无码精品 | 亚洲人成电影网站久久| 久久99精品久久久久久秒播| 国产综合久久久久| 久久久久亚洲AV片无码下载蜜桃| 亚洲伊人久久成综合人影院 | 久久久受www免费人成| 国产精品美女久久久久av爽| 久久久久久国产精品无码下载| 精品久久久久久久久久中文字幕 | 亚洲欧美成人久久综合中文网 | 久久精品国产99久久久古代| 精品久久久久国产免费| 国产亚州精品女人久久久久久 | 久久久久高潮毛片免费全部播放| 国内精品久久久久影院亚洲| 精品视频久久久久| 久久国产精品视频| 久久午夜无码鲁丝片午夜精品| 久久精品免费网站网| 久久青青草原精品国产软件|