結果
| 問題 |
No.662 スロットマシーン
|
| コンテスト | |
| ユーザー |
かぼちゃ
|
| 提出日時 | 2018-03-09 22:54:15 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 762 bytes |
| コンパイル時間 | 727 ms |
| コンパイル使用メモリ | 64,880 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-10 11:01:09 |
| 合計ジャッジ時間 | 1,319 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 10 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
vector<string> str(5);
vector<int> coin(5);
vector<int> u(5,5);
int ns = 1;
for(int i = 0;i < 5;i++){
cin >> str[i] >> coin[i];
}
for(int t = 0;t < 3;t++){
int n;
cin >> n;
ns *= n;
string a;
vector<int> st(5);
for(int i = 0;i < n;i++){
cin >> a;
for(int j = 0;j < 5;j++) if(a == str[j])st[j]++;
}
for(int j = 0;j < 5;j++) u[j] *= st[j];
}
float ans = 0;
for(int j = 0;j < 5;j++) ans += coin[j]*u[j];
cout << ans / ns << endl;
for(int j = 0;j < 5;j++) cout << u[j] << endl;
return 0;
}
かぼちゃ