#include #define OVERLOAD_REP(_1, _2, _3, name, ...) name #define REP1(i,n) for (auto i = std::decay_t{}; (i) != (n); ++(i)) #define REP2(i,l,r) for (auto i = (l); (i) != (r); ++(i)) #define rep(...) OVERLOAD_REP(__VA_ARGS__, REP2, REP1)(__VA_ARGS__) #define all(a) (a).begin(),(a).end() #define rall(a) (a).rbegin(),(a).rend() using namespace std; using ll = long long; using ull = unsigned long long; using P = pair; using LP = pair; using SP = pair; using vi = vector; using vl = vector; using vs = vector; using vc = vector; const int INF = 2e9; const long long LINF = 4e18; const int di[] = {0,1,0,-1,-1,1,-1,1}; const int dj[] = {1,0,-1,0,1,1,-1,-1}; template inline bool chmin(T& a, T b){if(a>b){a=b;return true;}return false;} template inline bool chmax(T& a, T b){if(a> n >> x; long long now = 1 , sum = 0; vector res; rep(i , n) { sum += now; res.push_back(now); now++; } if(sum > x) { cout << -1 << endl; return; } else { rep(i , n-1) { cout << res[i] << ' '; } cout << res[n-1]+(x-sum) << endl; } } int main () { int n , k; cin >> n >> k; vector a(n); rep(i , n) cin >> a[i]; long long res = 0; auto dfs = [&] (auto dfs , int d , int now , long long sum) -> void { if(d == k) { //cout << sum << endl; if((sum%998244353) <= (sum%998)) { res++; } return; } rep(i , now+1 , n) { //cout << sum << endl; dfs(dfs , d+1 , i , sum+a[i]); } }; dfs(dfs , 0 , -1 , 0); cout << res%998 << endl; return 0; }