#include using namespace std; #define int long long #define REP(i,m,n) for(int i=(m);i<(n);i++) #define rep(i,n) REP(i,0,n) #define pb push_back #define all(a) a.begin(),a.end() #define rall(c) (c).rbegin(),(c).rend() #define mp make_pair #define endl '\n' #define vec vector #define mat vector > #define fi first #define se second typedef long long ll; typedef unsigned long long ull; typedef pair pll; typedef long double ld; typedef complex comp; const ll inf=1e9+7; const ll mod=998244353; const int MAX=200010; //Union-Find木 int siz[MAX]; int par[MAX]; int depth[MAX]; void init(int n){ for(int i=0;i<=n;i++){ par[i]=i; depth[i]=0; } rep(i,n+1){ siz[i]=1; } } int root(int x){ return par[x]==x?x:par[x]=root(par[x]); } bool same(int x,int y){ return root(x)==root(y); } void unite(int x,int y){ x=root(x); y=root(y); ll sx=siz[x]; ll sy=siz[y]; if(x==y)return; if(depth[x]>n>>k; vectora(n); rep(i,n)cin>>a[i]; init(n); rep(j,10){ ll la=-1; rep(i,n){ if(a[i]&(1LL<used(n); ll cnt=0; vectorb(0); rep(i,n){ if(used[root(i)])continue; used[root(i)]=1; cnt++; b.pb(siz[root(i)]); } if(cnt >dp(cnt+1,vector(k+1)); dp[0][0]=1; rep(i,cnt){ rep(j,k+1){ dp[i+1][j]=(dp[i+1][j]+dp[i][j])%mod; if(j