diff --git "a/LiiNi-coder/202511/15 PGM \354\235\230\354\203\201.md" "b/LiiNi-coder/202511/15 PGM \354\235\230\354\203\201.md" new file mode 100644 index 00000000..68e28c69 --- /dev/null +++ "b/LiiNi-coder/202511/15 PGM \354\235\230\354\203\201.md" @@ -0,0 +1,21 @@ +```java +import java.util.*; + +class Solution { + public int solution(String[][] clothes) { + Map countByType = new HashMap<>(); + for (String[] cloth : clothes) { + String type = cloth[1]; + countByType.put(type, countByType.getOrDefault(type, 0) + 1); + } + int combinations = 1; + for (int count : countByType.values()) { + combinations *= (count + 1); + } + combinations -= 1; + + return combinations; + } +} + +```