hdu 2527
#include <iostream>#include <map>#include <string>using namespace std;int main(){int n;cin>>n;while(n--){map<char, int> count;map<char, int>::iterator iter;int m;string temp;cin>>m>>temp;for(int i=0; i<temp.length(); i++){iter=count.find(temp[i]);if(iter==count.end() ){count[temp[i]]=1;}else{count[temp[i]]=iter->second+1;}}}return 0;}
附件列表

浙公网安备 33010602011771号