From a32d349b18d0e08d8ffd1ef3dace080e76b129b3 Mon Sep 17 00:00:00 2001 From: wisdompeak Date: Fri, 20 Nov 2020 23:09:40 -0800 Subject: [PATCH] Create 1452.People-Whose-List-of-Favorite-Companies-Is-Not-a-Subset-of-Another-List_v2.cpp --- ...ies-Is-Not-a-Subset-of-Another-List_v2.cpp | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Others/1452.People-Whose-List-of-Favorite-Companies-Is-Not-a-Subset-of-Another-List/1452.People-Whose-List-of-Favorite-Companies-Is-Not-a-Subset-of-Another-List_v2.cpp diff --git a/Others/1452.People-Whose-List-of-Favorite-Companies-Is-Not-a-Subset-of-Another-List/1452.People-Whose-List-of-Favorite-Companies-Is-Not-a-Subset-of-Another-List_v2.cpp b/Others/1452.People-Whose-List-of-Favorite-Companies-Is-Not-a-Subset-of-Another-List/1452.People-Whose-List-of-Favorite-Companies-Is-Not-a-Subset-of-Another-List_v2.cpp new file mode 100644 index 000000000..f4dd1c8b3 --- /dev/null +++ b/Others/1452.People-Whose-List-of-Favorite-Companies-Is-Not-a-Subset-of-Another-List/1452.People-Whose-List-of-Favorite-Companies-Is-Not-a-Subset-of-Another-List_v2.cpp @@ -0,0 +1,26 @@ +class Solution { +public: + vector peopleIndexes(vector>& favoriteCompanies) + { + int n = favoriteCompanies.size(); + unordered_map>c2p; + for (int i=0; irets; + bitset<100>state; + for (int i=0; i