#pragma optimize("Ofast") #pragma target("avx2") #include using namespace std; #include using mint=atcoder::static_modint<998244353>; #define endl '\n' using lint=long long; #define all(n) (n).begin(),(n).end() int main(){ cin.tie(0)->sync_with_stdio(0); int n; cin>>n; vectora(n); for(int i=0;i>a[i]; vector>s(n+1); s[0].emplace_back(0); for(int i=0;i>g; for(int i=0;idp; dp[0]=1; for(auto [s,t]:g){ dp[t]+=dp[s]; if((t>>31)==n){ ans+=dp[s]; } } cout<