-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
#include <string>
#include <vector>
#include <unordered_map>
using namespace std;
int solution(vector<vector<string>> clothes) {
unordered_map<string, int> m;
for (const auto& item : clothes) {
m[item[1]]++;
}
int combinations = 1;
for (const auto& pair : m) {
combinations *= (pair.second + 1);
}
return combinations - 1;
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Projects
Status
Done