結果
問題 |
No.447 ゆきこーだーの雨と雪 (2)
|
ユーザー |
|
提出日時 | 2020-05-15 00:37:47 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 74 ms / 2,000 ms |
コード長 | 708 bytes |
コンパイル時間 | 3,488 ms |
コンパイル使用メモリ | 216,728 KB |
最終ジャッジ日時 | 2025-01-10 10:59:05 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; int main(){ int n; cin>>n; vector<int> star(n); rep(i,n) cin>>star[i]; map<string,pair<int,int>> sum; vector<map<string,int>> score(n); vector<int> cnt(n,1); int q; cin>>q; rep(t,q){ string s; char c; cin>>s>>c; int id=c-'A'; score[id][s]=50*star[id]+50*star[id]/(0.8+0.2*cnt[id]); sum[s].first+=score[id][s]; sum[s].second=t; cnt[id]++; } map<pair<int,int>,string> f; for(auto p:sum) f[{-p.second.first,p.second.second}]=p.first; int i=0; for(auto p:f){ cout<<i+1<<' '<<p.second; rep(i,n) cout<<' '<<score[i][p.second]; cout<<' '<<sum[p.second].first<<'\n'; i++; } return 0; }