#include<iostream> #include<vector> #include<algorithm> usingnamespacestd; intmain(){ int t = 6; int count = 0; vector<string> v; for (int i = 1; i <= t; ++i) { for (int j = 1; j <= t; ++j) { for (int k = 1; k <= t; ++k) { for (int l = 1; l <= t; ++l) { for (int m = 1; m <= t; ++m) { for (int n = 1; n <= t; ++n) { if (i == j || i == k || j == k || i == l || j == l || k == l || i == m || j == m || k == m || l == m || i == n || j == n || k == n || l == n || m == n) continue; if ((3 * i + 2 * j + k) == (l + 2 * m + 3 * n)) { string s = to_string(i) + to_string(j) + to_string(k) + to_string(l) + to_string(m) + to_string(n); int te = 0; if (v.size() > 0) { string tem = s; reverse(tem.begin(), tem.end()); vector<string>::iterator it; for (it = v.begin(); it != v.end(); it++) { if (*it == tem) { //cout<<tem<<endl; te = 1; break; } } } if (te == 0) { v.push_back(s); count++; printf(" %d %d %d | %d %d %d\n", i, j, k, l, m, n); } } } } } } } } cout << count << endl; return0; }