为什么第 7 行的 string 改成 char 就对了?
#include<bits/stdc++.h>
using namespace std;
const int mod=1e9+7;
long long dp[20];
int main(){
dp[0]=1;
string c[20]=" helloworld";
char s;
while((s=getchar())!=EOF){
for(int i=10;i>=1;i--)if(s==c[i]||s+32==c[i])dp[i]=(dp[i-1]+dp[i])%mod;
}
cout<<dp[10];
return 0;
}