結果
| 問題 | 
                            No.447 ゆきこーだーの雨と雪 (2)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             sugarrr
                         | 
                    
| 提出日時 | 2018-07-23 00:15:10 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 2,729 bytes | 
| コンパイル時間 | 1,334 ms | 
| コンパイル使用メモリ | 102,384 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-12-26 05:27:41 | 
| 合計ジャッジ時間 | 2,562 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 WA * 1 | 
| other | WA * 25 | 
ソースコード
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<stack>
#include<queue>
#include<vector>
#include<algorithm>
#include<string>
#include<iostream>
#include<set>
#include<map>
#include<bitset>
using namespace std;
typedef long long ll;
#define i_7 1000000007
#define i_5 1000000005
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<stack>
#include<queue>
#include<vector>
#include<algorithm>
#include<string>
#include<iostream>
#include<set>
#include<map>
#include<bitset>
using namespace std;
typedef long long ll;
#define i_7 1000000007
#define i_5 1000000005
ll mod(ll a){
    ll c=a%i_7;
    if(c>=0)return c;
    else return c+i_7;
}
typedef pair<int,int> i_i;
typedef pair<ll,ll> l_l;
ll inf=1000000000000;/*10^12*/
#define rep(i,l,r) for(ll i=l;i<=r;i++)
ll max(ll a,ll b){if(a<b)return b;else return a;}
ll min(ll a,ll b){if(a>b)return b;else return a;}
//////////////////////////////////////
#define N 30
struct person{
    string name;
    int score[N];
    int sumscore;
    ll lastsubmit=0;
};
/*struct submit{
    string name;
    int q;
    int time;
};
bool compsub(submit a,submit b){
    if(a.name<=b.name){
        return true;
    }else return false;
}*/
bool comp(person a,person b){
    if(a.sumscore==b.sumscore&&a.lastsubmit<b.lastsubmit){
        return true;
    }else if(a.sumscore>b.sumscore){
        return true;
    }else return false;
}
int ansnum[N];
int main(){
    int n;cin>>n;
    int l[n];rep(i,0,n-1)cin>>l[i];
    int t;cin>>t;
   /* submit sub[t];
    rep(i,0,t-1){
        cin>>sub[i].name>>sub[i].q;
        sub[i].time=i;
    }
    sort(sub,sub+t);
    vector<person> p;
    rep(i,0,t-1){
        if(i==0||sub[i].name!=sub[i-1].name){
            person newp;
            newp.name=sub[i].name;
            newp.
        }else{
        }
    }*/
    
    vector<person> p;
    rep(i,0,t-1){
        string name;cin>>name;
        string prob;cin>>prob;
        int q;q=prob[0]-'A';
        ansnum[q]++;
        int size=p.size();
        int pos=0;
        while(pos<=size-1){
            if(p[pos].name!=name){
                pos++;
            }else{
                break;
            }
        }
        if(pos==size){
            person newp;
            newp.name=name;
            p.push_back(newp);
        }
        p[pos].lastsubmit=i;
        p[pos].score[q]=50*l[q]+(int)((double)(50*l[q])/(double)(0.8+0.2*(double)ansnum[q]));
        p[pos].sumscore+=p[pos].score[q];
    }
    sort(p.begin(),p.end(),comp);
    int size=p.size();
    rep(i,0,size-1){
        cout<<i+1<<" "<<p[i].name<<" ";
        rep(j,0,n-1)cout<<p[i].score[j]<<" ";
        cout<<p[i].sumscore<<endl;
    }
    
    return 0;
}
            
            
            
        
            
sugarrr