#include #include using namespace atcoder; using namespace std; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll mod=1000000007; ll inf=10099999999999990; int main(){ ll n,w; cin >> n >> w; vectora(n); for (ll i = 0; i < n; i++) { cin >> a[i]; } vectorthr(20,1),two(20,1); for (ll i = 1; i < 20; i++) { thr[i]=thr[i-1]*3; two[i]=two[i-1]*2; } ll ans=0; mapmemo; for (ll i = 0; i =1) { z+=two[j]; } } if (x==w) { memo[z]++; } }for(auto v:memo){ ans++; } cout << ans << endl; }