• <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| 伊人久久大香线蕉亚洲五月天| 久久水蜜桃亚洲av无码精品麻豆| 久久A级毛片免费观看| 久久久久一级精品亚洲国产成人综合AV区 | 精品久久久无码中文字幕| 久久久91人妻无码精品蜜桃HD| 久久精品国产免费观看三人同眠| aaa级精品久久久国产片| 日日狠狠久久偷偷色综合免费| 久久天天躁狠狠躁夜夜网站| 久久中文字幕视频、最近更新| 久久精品欧美日韩精品| 久久中文字幕视频、最近更新| 国产精品一久久香蕉国产线看| 手机看片久久高清国产日韩| 久久精品国产清高在天天线| 亚洲人成网站999久久久综合| 97久久超碰国产精品旧版 | 欧美国产成人久久精品| 久久久青草久久久青草| 亚洲AV无码久久精品狠狠爱浪潮 | 亚洲国产精品久久久天堂 | 久久久久久久亚洲Av无码| 亚洲伊人久久成综合人影院 | 91视频国产91久久久| 无码任你躁久久久久久老妇| 香蕉久久夜色精品国产小说| 久久精品无码专区免费东京热| 久久精品国产亚洲AV蜜臀色欲| 久久夜色精品国产亚洲av| 精品久久久久久国产三级| 国产午夜精品理论片久久 | 97久久精品人人澡人人爽| 99麻豆久久久国产精品免费| 久久综合狠狠综合久久综合88| 色婷婷综合久久久久中文| 久久水蜜桃亚洲av无码精品麻豆|