/* * File: balloon.cpp * Author: cteam003 * * Created on October 22, 2016, 9:18 AM */ #include #include #include #include #include #include using namespace std; /* * */ int main(int argc, char** argv) { string str; map result; cin >> str; while(cin >> str) { set tmp; for (char c : str) tmp.insert(c); str = ""; for (char c : tmp) str += c; if (result.count(str) == 0) result[str] = 1; else result[str] = result[str] + 1; } cout << result.size(); return 0; }