基本的dfs
void dfs(string &digits,string *s,vector<string> &res,string oneRes,int cur,int n){
if(cur==n){res.push_back(oneRes);return ;}
string ts=s[digits[cur]-'0'];
for(int i=0;i<ts.length();i++){
dfs(digits,s,res,oneRes+ts[i],cur+1,n);
}
}
vector<string> letterCombinations(string digits) {
string s[10];
s[2]="abc";s[3]="def";s[4]="ghi";s[5]="jkl";
s[6]="mno";s[7]="pqrs";s[8]="tuv";s[9]="wxyz";
vector<string> res;
int n=digits.size();
if(n==0)return res;
dfs(digits,s,res,"",0,n);
return res;
}