結果
問題 |
No.447 ゆきこーだーの雨と雪 (2)
|
ユーザー |
![]() |
提出日時 | 2020-04-05 17:00:34 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,316 bytes |
コンパイル時間 | 6,149 ms |
コンパイル使用メモリ | 217,536 KB |
最終ジャッジ日時 | 2025-01-09 14:16:45 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | WA * 25 |
ソースコード
#include<bits/stdc++.h> #define ALL(v) std::begin(v),std::end(v) using lint=long long; using lubl=long double; int main(){ std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false); std::cout.setf(std::ios_base::fixed);std::cout.precision(15); lint n;std::cin>>n; std::vector<lint>lev(n),ac(n); for(lint&x:lev)std::cin>>x; std::vector<std::string>names; std::vector<std::tuple<lint,std::string,std::vector<lint>>>table; lint q;std::cin>>q; while(q--){ std::string s;std::cin>>s; lint i; if(auto f=std::find(ALL(names),s);f!=names.end()){ i=f-names.begin(); }else{ i=names.size(); table.emplace_back(0,s,std::vector<lint>(n)); names.push_back(s); } char no;std::cin>>no; lint j=no-'A'; lint score=50*lev.at(j)+50*lev.at(j)/(0.8+0.2*(++ac.at(j))); std::get<2>(table.at(i)).at(j)=score; } for(auto&&row:table){ std::get<0>(row)=std::accumulate(ALL(std::get<2>(row)),0ll); } std::sort(ALL(table),std::greater<>{}); lint i=0; for(auto&&row:table){ std::cout<<++i<<" "<<std::get<1>(row); for(auto&&x:std::get<2>(row)){ std::cout<<" "<<x; } std::cout<<" "<<std::get<0>(row)<<'\n'; } }