#if !__INCLUDE_LEVEL__ #include __FILE__ template bool next_combination(const T first, const T last, int k) { const T subset = first + k; // empty container | k = 0 | k == n if (first == last || first == subset || last == subset) { return false; } T src = subset; while (first != src) { src--; if (*src < *(last - 1)) { T dest = subset; while (*src >= *dest) { dest++; } iter_swap(src, dest); rotate(src + 1, dest + 1, last); rotate(subset, subset + (last - dest) - 1, last); return true; } } // restore rotate(first, subset, last); return false; } void solve(){ int N,K; cin>>N>>K; vector A(N); rep(i,N){cin>>A[i];A[i]+=i/1000000000000.0;} sort(all(A)); ll cnt=0; do{ ll sum=0; rep(i,K)sum+=A[i]; if(sum%998==sum%998244353)cnt=(cnt+1)%998; }while(next_combination(all(A),K)); cout< #include using namespace std; using namespace atcoder; #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #define FOR(i,l,r) for(int i=(l);i<(r);++i) #define rep(i,n) FOR(i,0,n) using ll = long long; using ull = unsigned long long; using pii = pair; using pll = pair; using vi = vector; using vs = vector; using vll = vector; #define pf push_front #define pb push_back #define mp make_pair #define fi first #define se second #define sz(x) ((int)x.size()) #define pqueue priority_queue #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; #define INF (1<<30)-1 #define INFLL (1LL<<60)-1 #define pcnt __builtin_popcount #define bit(n) (1LL<<(n)) #define UNIQUE(v) v.erase(unique(v.begin(),v.end()),v.end()); template void out(T vec){for(int c:vec)cout< bool chmax(T &a,const T& b){if(a bool chmin(T &a,const T& b){if(a>b){a=b;return true;}return false;} void solve(); // const int mod = ; // using mint = modint998244353; // using mint = modint1000000007; #ifdef LOCAL # include # define debug(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__) #else # define debug(...) (static_cast(0)) #endif int main(){ cin.tie(0); ios::sync_with_stdio(0); cout<