#include using namespace std; using ll = long long; int main() { int n, k; cin >> n >> k; ll ans = 0; vector a(n), c; for (int i = 0; i < n; i++) cin >> a[i]; for (int i = 0; i < n - k; i++) c.push_back(0); for (int i = 0; i < k; i++) c.push_back(1); do { ll cnt = 0; for (int i = 0; i < n; i++) { if (c[i]) cnt += a[i]; } if (cnt % 998244353 < cnt % 998) ans++; } while (next_permutation(begin(c), end(c))); cout << ans % 998 << endl; }