#3757

Number of Effective Subsequences

international master · 1975 · lc hard +32 · 30.6% accepted · 30 likes · top 8%

Description

Given an integer array nums whose strength is the bitwise OR of all its elements, count the subsequences whose removal would strictly reduce the strength of the remaining elements, returning the total modulo 109 + 7 (the bitwise OR of an empty array is 0).

Code

1
2
3