結果

問題 No.447 ゆきこーだーの雨と雪 (2)
ユーザー chocoruskchocorusk
提出日時 2019-12-13 18:19:06
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 1,207 bytes
コンパイル時間 1,690 ms
コンパイル使用メモリ 136,616 KB
実行使用メモリ 14,492 KB
最終ジャッジ日時 2023-09-09 14:13:08
合計ジャッジ時間 3,617 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
6,556 KB
testcase_01 AC 4 ms
6,496 KB
testcase_02 AC 4 ms
6,700 KB
testcase_03 AC 10 ms
7,020 KB
testcase_04 AC 9 ms
6,816 KB
testcase_05 AC 18 ms
7,796 KB
testcase_06 AC 46 ms
11,904 KB
testcase_07 AC 19 ms
8,220 KB
testcase_08 AC 23 ms
9,044 KB
testcase_09 AC 35 ms
10,512 KB
testcase_10 AC 9 ms
7,120 KB
testcase_11 AC 11 ms
7,244 KB
testcase_12 AC 14 ms
7,908 KB
testcase_13 AC 29 ms
9,588 KB
testcase_14 AC 37 ms
10,296 KB
testcase_15 AC 12 ms
7,372 KB
testcase_16 AC 11 ms
7,672 KB
testcase_17 AC 9 ms
7,060 KB
testcase_18 AC 5 ms
6,664 KB
testcase_19 AC 61 ms
14,492 KB
testcase_20 AC 40 ms
10,944 KB
testcase_21 AC 13 ms
7,744 KB
testcase_22 AC 10 ms
7,168 KB
testcase_23 AC 15 ms
7,696 KB
testcase_24 AC 40 ms
11,348 KB
testcase_25 AC 56 ms
13,508 KB
testcase_26 AC 22 ms
8,732 KB
testcase_27 AC 20 ms
8,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#include <utility>
#include <functional>
#include <time.h>
#include <stack>
#include <array>
#define popcount __builtin_popcount
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;

int main()
{
	int n;
	cin>>n;
	int l[30];
	for(int i=0; i<n; i++) cin>>l[i];
	int T; cin>>T;
	string name[100010];
	char p[100010];
	map<string, int> s, t;
	map<pair<string, int>, int> v;
	map<P, string> mp;
	int cnt[30]={};
	for(int i=0; i<T; i++){
		cin>>name[i]>>p[i];
		cnt[p[i]-'A']++;
		v[{name[i], p[i]-'A'}]=(int)(50*l[p[i]-'A']+50*l[p[i]-'A']/(0.8+0.2*cnt[p[i]-'A']));
		s[name[i]]+=v[{name[i], p[i]-'A'}];
		t[name[i]]=i;
	}
	for(auto p:s){
		mp[{-p.second, t[p.first]}]=p.first;
	}
	int m=0;
	for(auto &p:mp){
		m++;
		cout<<m<<" "<<p.second;
		for(int i=0; i<n; i++){
			cout<<" "<<v[{p.second, i}];
		}
		cout<<" "<<-p.first.first<<endl;
	}
	return 0;
}
0