分析:
我只是想练习一下map的用法,不然又忘了。。。
代码:
//hdu 1228 #include #include #include #include #include using namespace std; map d; void init() { d[zero]=0; d[one]=1; d[two]=2; d[three]=3; d[four]=4; d[five]=5; d[six]=6; d[seven]=7; d[eight]=8; d[nine]=9;; } int deal(string s) { int num=0; string word=; for(int i=0;i