SRM453.5 Div2 Easy(250) ToolsBox
#include <sstream> #include <vector> #include <set> using namespace std; class ToolsBox { public: int countTools( vector<string> need ) { set<string> tool; for ( int i=0; i<(int)need.size(); i++ ) { stringstream s( need[i] ); string t; while ( s >> t ) tool.insert( t ); } return (int)tool.size(); } };