1.Jewels and Stones
-------通用解法
class Solution {
public:
int numJewelsInStones(string J, string S) {
int i=0;
int cout=0;
for(;i<J.length();i++){
int j=0;
for(;j<S.length();j++){
if(J==S){
cout++;
}
}
}
return cout;
}
};
-------高级用法解析
**** Hidden Message *****
页:
[1]