• <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 閱讀(401) 評論(0)  編輯 收藏 引用 所屬分類: 題目分類:基礎/模擬
            日本道色综合久久影院| 亚洲欧美另类日本久久国产真实乱对白| 色综合久久夜色精品国产| 中文字幕久久亚洲一区| 久久久噜噜噜久久中文福利| 国产亚洲欧美成人久久片 | 久久免费香蕉视频| 久久人做人爽一区二区三区| 久久亚洲精品中文字幕| 久久伊人精品青青草原日本| 久久亚洲春色中文字幕久久久| 国产精品免费久久久久久久久| 性做久久久久久久久浪潮| 精品久久久久久无码专区| 久久黄视频| 久久久综合九色合综国产| 精品熟女少妇AV免费久久| 中文精品久久久久国产网址| 怡红院日本一道日本久久| 少妇熟女久久综合网色欲| 免费观看成人久久网免费观看| 久久无码AV中文出轨人妻| 国产高潮久久免费观看| www性久久久com| MM131亚洲国产美女久久| 中文精品久久久久人妻不卡| 香蕉久久影院| 久久综合五月丁香久久激情| 精品久久久久久中文字幕| 国产毛片欧美毛片久久久| 伊人久久大香线蕉成人| 女同久久| 久久亚洲AV无码精品色午夜| 久久久久九九精品影院| 精品熟女少妇aⅴ免费久久| 成人国内精品久久久久影院VR| 久久w5ww成w人免费| 久久精品国产久精国产思思| 亚洲级αV无码毛片久久精品| 日韩十八禁一区二区久久| 亚洲精品97久久中文字幕无码|