/* * File: balloon.cpp * Author: cteam011 * * Created on October 22, 2016, 9:17 AM */ #include #include #include #include using namespace std; int makeInt(bool s [9]){ int ret = 0; for ( int i = 0; i < 9; i++){ ret += s[i]; ret*=10; } return ret; } int main(int argc, char** argv) { set cats; int poc; while(!feof(stdin) && cin>>poc){ getchar(); for (int i = 0; i < poc; i++){ bool bal[9]; for (int i = 0; i < 9; i++) bal[i] = false; char c; while ((c = getchar())!= '\n' && !feof(stdin)) bal[c-'1'] = true; cats.insert(makeInt(bal)); } cout<