• <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)  編輯 收藏 引用 所屬分類: 題目分類:基礎/模擬
            久久久精品国产Sm最大网站| A级毛片无码久久精品免费| 99国产精品久久久久久久成人热| 蜜臀av性久久久久蜜臀aⅴ| 国产精品一久久香蕉国产线看| 精品久久久久香蕉网| 欧美久久一区二区三区| 久久久久99精品成人片直播| 欧美日韩精品久久久久| 久久无码AV中文出轨人妻| 久久国产免费| 中文精品久久久久人妻不卡| 久久精品国产精品青草| 久久精品国产清自在天天线 | 久久99久久成人免费播放| 18禁黄久久久AAA片| 久久最近最新中文字幕大全| 香蕉久久夜色精品升级完成| 一本色道久久88—综合亚洲精品| 日本一区精品久久久久影院| 久久WWW免费人成一看片| 久久亚洲高清综合| 日产久久强奸免费的看| 久久亚洲国产中v天仙www| 色天使久久综合网天天| 成人精品一区二区久久| 伊人久久大香线焦综合四虎| 97久久香蕉国产线看观看| 国产激情久久久久久熟女老人| 91精品国产高清久久久久久91 | 亚洲国产精品无码成人片久久| 狠狠色综合久久久久尤物| 久久99精品久久久久久| 久久精品国产亚洲av高清漫画| 久久精品免费一区二区| 香蕉久久影院| 国产精品久久久久久久久软件| 久久久久18| 久久国产AVJUST麻豆| 久久天天躁狠狠躁夜夜avapp| 女人高潮久久久叫人喷水|