You are viewing a single comment's thread. Return to all comments →
One more hint. If B[i]==1, you need to multiply every A on all C's product. It can be done in O(N+M).
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and Queries
You are viewing a single comment's thread. Return to all comments →
One more hint. If B[i]==1, you need to multiply every A on all C's product. It can be done in O(N+M).