結果
| 問題 |
No.785 色食い虫
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-02-14 16:32:33 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 768 bytes |
| コンパイル時間 | 955 ms |
| コンパイル使用メモリ | 66,292 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-13 11:27:22 |
| 合計ジャッジ時間 | 1,817 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
#include <iostream>
#include <vector>
#include <map>
#include <array>
using namespace std;
template<class T> int maxReturn(T a, T b) {if (a > b) {return a;} else {return b;}}
template<class T> int minReturn(T a, T b) {if (a < b) {return a;} else {return b;}}
vector<char> split (string str) {
vector<char> res;
for (int i = 0; i < str.length(); i++) {
if (str[i] != ',') {
res.push_back(str[i]);
}
}
return res;
}
int countLength (string str) {
if (str == "NONE") return 16;
return 16 - split(str).size();
}
int main(void){
string R, G, B;
cin >> R >> G >> B;
int RCount = countLength(R);
int GCount = countLength(G);
int BCount = countLength(B);
cout << (RCount * RCount) * (GCount * GCount) * (BCount * BCount) << endl;
}