dp+bitmasking question


this question makes use of bitmasking … i was unable to understand the editorial … please guide me how to proceed as i don’t have much of any experience in bitmasking questions . Thanks.
P.S. :- also suggest some nice questions on dp+bitmasking to start with as i have encountered problems which are pity tough for me start with .

2 Likes

hey there . refer to my code http://ideone.com/g9m7Xq … and let me know if you could understand

also , how are you keeping track of , picking the three strings such that one or more than one vowels are common in them

1 Like

yes … i got that you are doing bitwise OR to keep the count of number of vowels … but afterwards
for(it=mp.begin();it!=mp.end();it++)
if(((it->first)&i)==i)
term+=it->second;

i couldn’t understand this .