标签:整数 ble tom ring pre others ++ return span
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 46381 Accepted Submission(s): 11369
you are my friend #
4
#include <iostream> #include <string> #include <set> using namespace std; const int max = 10001; int main() { string line,str; set<string> a; while (getline(cin , line) && line != "#") { a.clear(); for (int i = 0; i < line.size(); i++) { str = ""; while (i < line.size() && line[i] >= ‘a‘ && line[i] <= ‘z‘) { str += line[i]; i++; } if (str!="") a.insert(str); } cout << a.size() << endl; } return 0; }
标签:整数 ble tom ring pre others ++ return span
原文地址:http://www.cnblogs.com/theskulls/p/6057436.html