#include #include using namespace std; using lint = long long; using mint1 = atcoder::modint998244353; using mint2 = atcoder::modint; int main() { int n, k; cin >> n >> k; vector a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } mint2::set_mod(998); vector v(n, 'x'); for (int i = 0; i < k; i++) { v[i] = 'o'; } mint2 ans = 0; do { mint1 cnt1 = 0; mint2 cnt2 = 0; for (int i = 0; i < n; i++) { if (v[i] == 'o') { cnt1 += mint1(a[i]); cnt2 += mint2(a[i]); } } if (cnt1.val() <= cnt2.val()) { ans++; } } while (next_permutation(v.begin(), v.end())); cout << ans.val() << endl; }