문제출처: 위장 c++
#include <string>
#include <vector>
#include <map>
using namespace std;
int solution(vector<vector<string>> clothes) {
int answer = 0;
int answer = 0;
map<string,int> list;
for(int i = 0; i < clothes.size(); i++){
string temp = clothes[i][1];
list[temp]++;
}
map<string,int>::iterator iter = list.begin();
answer = iter->second +1;
for(iter++; iter != list.end(); iter++){
answer *= (iter->second +1);
}
return --answer;
}