#include using ll=long long; const long long INF=1LL<<60; ll h,w; long long power(long long a, long long n, ll m) { long long res = 1; while (n > 0) { if (n%2==1){ res = res * a % m; n-=1; } a = a * a % m; n/=2; } return res; } int main(){ ll n,p,q; std::cin >> n >> p >> q; std::vectorA(n); for(auto&a:A)std::cin >> a; std::vectorten(n),nine(n),seven(n),five(n); for(int i=0;i> dp(p,std::vector(5)); dp[0][0]=1; for(int i=0;i>nw(p,std::vector(5)); for(int rem=0;rem