Blackslex and Girls

There are n districts. Party A has exactly x voters and party B has exactly y voters. Allocate every voter to a district. District i must receive at least p[i] voters. If s[i] is 0, A must receive strictly more voters than B in that district. If s[i] is 1, B must receive strictly more voters. Return YES when an allocation exists and NO otherwise.

Examples
Input: [1,5,0,100,1]
Output: 1
Hints
Related Problems

Blackslex and Girls

There are `n` districts. Party A has exactly `x` voters and party B has exactly `y` voters. Allocate every voter to a district. District `i` must receive at least `p[i]` voters. If `s[i]` is `0`, A must receive strictly more voters than B in that district. If `s[i]` is `1`, B must receive strictly more voters. Return `YES` when an allocation exists and `NO` otherwise.