結果
| 問題 |
No.447 ゆきこーだーの雨と雪 (2)
|
| コンテスト | |
| ユーザー |
gigime
|
| 提出日時 | 2016-11-18 23:28:31 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,261 bytes |
| コンパイル時間 | 1,951 ms |
| コンパイル使用メモリ | 188,276 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-26 08:38:19 |
| 合計ジャッジ時間 | 2,714 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | WA * 25 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,l,r) for(int i = (l);i < (r);i++)
#define ALL(x) (x).begin(),(x).end()
template<typename T> bool chmax(T& a,const T& b){return a < b ? (a = b,true) : false;}
template<typename T> bool chmin(T& a,const T& b){return b < a ? (a = b,true) : false;}
typedef long long ll;
int N,T;
int get_score(int n,int k)
{
return 50.0 * n + (int) (50.0 * n / (0.8 + 0.2 * k));
}
int main()
{
cin.tie(nullptr);
ios::sync_with_stdio(false);
cin >> N;
vector<int> L(N);
FOR(i,0,N){
cin >> L [i];
}
cin >> T;
map< string, vector<int> > mp;
vector<int> solved(N);
FOR(i,0,T){
string s;
char c;
cin >> s >> c;
int p_idx = c - 'A';
if(mp.count(s) == 0){
mp [s].assign(N + 2,{});
}
int score = get_score(L [p_idx],++solved [p_idx]);
mp [s] [0] += score;
mp [s] [1] = T - 1 - i;
mp [s] [p_idx + 2] += score;
}
vector< pair< vector<int>,string > > standing;
for(auto it : mp){
standing.push_back(make_pair(it.second,it.first));
}
sort(standing.rbegin(),standing.rend());
FOR(i,0,standing.size()){
cout << i + 1 << " " << standing [i].second << " ";
FOR(j,2,N + 2){
cout << standing [i].first [j] << " ";
}
cout << standing [i].first.front() << endl;
}
return 0;
}
gigime