up(1,n,i) {cin >> a[i];c[i] = c[i-1] *a[i];} dfs(m,n);return0; }
\c2=b3 因此b[i]=m/c[i-1] #include <iostream> #include <algorithm> using namespace std; const int N = 30; int n,m; int a[N],b[N],c[N];//按照题目要求设置 int main() { cin>>n>>m; c[0]=1;//初始化c[0] for(int i=1;i<=n;i++) { cin>>a[i]; c[i]=c[i-...