結果
| 問題 | No.447 ゆきこーだーの雨と雪 (2) |
| コンテスト | |
| ユーザー |
okayunonaha
|
| 提出日時 | 2016-11-19 00:15:35 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,481 bytes |
| 記録 | |
| コンパイル時間 | 698 ms |
| コンパイル使用メモリ | 66,392 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-26 09:08:45 |
| 合計ジャッジ時間 | 1,717 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | WA * 25 |
ソースコード
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
struct grd {
string name;
int last_ac, point;
int p[27];
};
int N, L[27], Lsub[27], T, g_size = 0;
grd g[4002];
bool comp(const grd &g1, const grd &g2) {
if(g1.point == g2.point) return g1.last_ac < g2.last_ac;
return g1.point > g2.point;
}
int main(void) {
cin.tie(0);
ios::sync_with_stdio(false);
fill(Lsub, Lsub + 27, 1);
string n;
char p;
bool flag = false;
cin >> N;
for(int i = 0; i < N; i++) {
cin >> L[i];
}
cin >> T;
for(int i = 0; i < T; i++) {
cin >> n >> p;
flag = false;
for(int j = 0; j < g_size; ++j) {
if(g[j].name == n) {
g[j].p[p - 'A'] = 50*L[p-'A'] + (int)(50*L[p-'A'] / (0.8 + 0.2 * Lsub[p-'A']++));
g[j].point+=g[j].p[p-'A'];
g[j].last_ac = i;
flag = true;
}
}
if(!flag) {
g[g_size].name = n;
g[g_size].p[p-'A'] = 50*L[p-'A'] + (int)(50*L[p-'A'] / (0.8 + 0.2 * Lsub[p-'A']++));
g[g_size].point+=g[g_size].p[p-'A'];
g[g_size].last_ac = i;
g_size++;
}
}
sort(g, g + g_size, comp);
for(int i = 0; i < g_size; ++i) {
cout << i+1 << " " << g[i].name << " ";
for(int j = 0; j < N; ++j) {
cout << g[i].p[j] << " ";
}
cout << g[i].point << endl;
}
}
okayunonaha