• <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成人网| 久久99国内精品自在现线| 99热成人精品热久久669| 国产一区二区三精品久久久无广告 | 亚洲精品无码久久久| 久久久久久国产精品无码下载 | 国产精品欧美久久久天天影视| 国产午夜电影久久| 熟妇人妻久久中文字幕| 狠狠综合久久综合中文88| 国内精品久久久久久久久电影网| 91亚洲国产成人久久精品网址| 精品国产乱码久久久久软件| 精品久久久久久成人AV| 久久久艹| 国内精品久久久久久麻豆| 久久w5ww成w人免费| 亚洲女久久久噜噜噜熟女| 欧美粉嫩小泬久久久久久久 | 久久天天婷婷五月俺也去| 一本色道久久88加勒比—综合| 伊人久久综合无码成人网| 亚洲精品乱码久久久久久蜜桃| 久久精品国产99国产电影网| 国内精品久久久久久久97牛牛| 久久久无码精品亚洲日韩软件| 嫩草影院久久国产精品| 精品久久久久久无码专区不卡| 国产激情久久久久久熟女老人| 亚洲另类欧美综合久久图片区| 久久综合五月丁香久久激情| 精品久久久久久久中文字幕| 99久久精品免费观看国产| 久久国产乱子精品免费女| 国产精品久久久久影视不卡| 久久99热只有频精品8| 大伊人青草狠狠久久| 亚洲国产成人久久综合一 | 一本一本久久a久久综合精品蜜桃 一本一道久久综合狠狠老 | 久久久久久久久久久|