题意:

解法:







时间复杂度:

std:

#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int maxn = 105;
int dp[maxn],a[maxn];
const int mod = 1e9 + 7;
int main()
{
    int n,ans = 0;
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a[i];
        dp[i] = 1;
        for(int j=1;j<i;j++){
            if(log(a[i])/i > log(a[j])/j)
                dp[i] += dp[j],dp[i] %= mod;
        }
        ans += dp[i],ans %= mod;
    }
    cout<<ans<<endl;
    return 0;
}