結果

問題 No.447 ゆきこーだーの雨と雪 (2)
ユーザー furafura
提出日時 2020-05-15 00:37:47
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 48 ms / 2,000 ms
コード長 708 bytes
コンパイル時間 2,678 ms
コンパイル使用メモリ 226,040 KB
実行使用メモリ 9,844 KB
最終ジャッジ日時 2023-10-14 10:45:10
合計ジャッジ時間 4,842 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,368 KB
testcase_01 AC 1 ms
4,368 KB
testcase_02 AC 1 ms
4,372 KB
testcase_03 AC 6 ms
4,372 KB
testcase_04 AC 5 ms
4,368 KB
testcase_05 AC 11 ms
4,372 KB
testcase_06 AC 34 ms
7,756 KB
testcase_07 AC 13 ms
4,764 KB
testcase_08 AC 16 ms
5,488 KB
testcase_09 AC 25 ms
6,396 KB
testcase_10 AC 4 ms
4,368 KB
testcase_11 AC 7 ms
4,368 KB
testcase_12 AC 9 ms
4,408 KB
testcase_13 AC 20 ms
5,776 KB
testcase_14 AC 26 ms
6,380 KB
testcase_15 AC 8 ms
4,372 KB
testcase_16 AC 7 ms
4,372 KB
testcase_17 AC 6 ms
4,368 KB
testcase_18 AC 3 ms
4,372 KB
testcase_19 AC 48 ms
9,844 KB
testcase_20 AC 30 ms
7,004 KB
testcase_21 AC 9 ms
4,372 KB
testcase_22 AC 6 ms
4,368 KB
testcase_23 AC 10 ms
4,404 KB
testcase_24 AC 29 ms
7,256 KB
testcase_25 AC 43 ms
9,012 KB
testcase_26 AC 15 ms
5,120 KB
testcase_27 AC 14 ms
4,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0