#include using namespace std; const int mod = 13313; const int nax = 2e5 + 5; int t[nax]; typedef long long T; vector brute_mul(const vector & a, const vector & b) { if(a.empty() || b.empty()) return vector{}; vector r(a.size() + b.size() - 1, 0); for(int i = 0; i < (int) a.size(); ++i) for(int j = 0; j < (int) b.size(); ++j) r[i+j] += a[i] * b[j]; for(auto & x : r) x %= mod; return r; } vector karatsuba(vector a, vector b) { if(max(a.size(), b.size()) <= 100) return brute_mul(a, b); int half = (max(a.size(), b.size()) + 1) / 2; vector a2(max(0, (int) a.size() - half)), b2(max(0, (int) b.size() - half)); for(int i = half; i < (int) a.size(); ++i) a2[i - half] = a[i]; a.resize(min(half, (int) a.size())); for(int i = half; i < (int) b.size(); ++i) b2[i - half] = b[i]; b.resize(min(half, (int) b.size())); vector z0 = karatsuba(a, b); assert(a.size() >= a2.size()); assert(b.size() >= b2.size()); for(int i = 0; i < (int) a2.size(); ++i) a[i] += a2[i]; for(int i = 0; i < (int) b2.size(); ++i) b[i] += b2[i]; vector z1 = karatsuba(a, b); vector z2 = karatsuba(a2, b2); vector r(max(z2.size() + 2 * half, z1.size() + half), 0); for(int i = 0; i < (int) z2.size(); ++i) { r[i + half] -= z2[i]; r[i + 2 * half] += z2[i]; } for(int i = 0; i < (int) z1.size(); ++i) r[i + half] += z1[i]; for(int i = 0; i < (int) z0.size(); ++i) { r[i] += z0[i]; r[i + half] -= z0[i]; } for(auto & x : r) { x %= mod; if(x < 0) x += mod; } while(!r.empty() && r.back() == 0) r.pop_back(); return r; } vector solve(vector freq) { if(freq.size() == 1) return vector(freq[0] + 1, 1); vector a, b; for(int i = 0; i < (int) freq.size(); ++i) { if(i < (int) freq.size() / 2) a.push_back(freq[i]); else b.push_back(freq[i]); } return karatsuba(solve(a), solve(b)); } void te() { int n, k; scanf("%d%d", &n, &k); assert(n >=1 and n<=(int)2e5); assert(k >=1 and k<=n); for(int i = 0; i < n; ++i){ scanf("%d", &t[i]); assert(t[i] >=1 and t[i] <= (int)2e5); } sort(t, t + n); vector freq; for(int i = 0; i < n; ++i) { int cnt = 1; while(i + 1 < n && t[i] == t[i+1]) { ++i; ++cnt; } freq.push_back(cnt); } printf("%d\n", (int) solve(freq)[k]); } int main() { int T=1; while(T--) te(); }