fork download
  1. #include <algorithm>
  2. #include <iostream>
  3. #include <map>
  4. #include <set>
  5. #include <vector>
  6.  
  7.  
  8. struct Trans {
  9. int Item;
  10. float Prob;
  11.  
  12. };
  13. /*std::istream& operator>>(std::istream &is, Trans &d)
  14. {
  15. return is >> d.Item >> d.Prob ;
  16. }*/
  17.  
  18.  
  19.  
  20.  
  21. /*void ScanData()
  22. {
  23. ifstream in;
  24. in.open("data.txt");
  25.  
  26. std::string line;
  27. int i = 0;
  28.  
  29.  
  30.  
  31. while (std::getline(in, line))
  32. {
  33. std::stringstream Sline1(line);
  34. std::stringstream ss(line);
  35. std::vector<Trans> inner;
  36.  
  37. Msize = std::distance(std::istream_iterator<std::string>(Sline1),
  38. std::istream_iterator<std::string>());
  39.  
  40.  
  41. if (temp > Msize)
  42. Msize = temp;
  43. else
  44. temp = Msize;
  45.  
  46. Trans info;
  47.  
  48. while (ss >> info)
  49. inner.push_back(info);
  50.  
  51. data.push_back(inner);
  52.  
  53.  
  54.  
  55. }
  56. }*/
  57.  
  58.  
  59.  
  60.  
  61. template <typename Iterator>
  62. inline bool next_combination(const Iterator first, Iterator k, const Iterator last)
  63. {
  64. /* Credits: Thomas Draper */
  65. if ((first == last) || (first == k) || (last == k))
  66. return false;
  67. Iterator itr1 = first;
  68. Iterator itr2 = last;
  69. ++itr1;
  70. if (last == itr1)
  71. return false;
  72. itr1 = last;
  73. --itr1;
  74. itr1 = k;
  75. --itr2;
  76. while (first != itr1)
  77. {
  78. if (*--itr1 < *itr2)
  79. {
  80. Iterator j = k;
  81. while (!(*itr1 < *j)) ++j;
  82. std::iter_swap(itr1, j);
  83. ++itr1;
  84. ++j;
  85. itr2 = k;
  86. std::rotate(itr1, j, last);
  87. while (last != j)
  88. {
  89. ++j;
  90. ++itr2;
  91. }
  92. std::rotate(k, itr2, last);
  93. return true;
  94. }
  95. }
  96. std::rotate(first, k, last);
  97. return false;
  98. }
  99.  
  100.  
  101. int main()
  102. {
  103. //ScanData();
  104. int threshold = 3;
  105.  
  106. std::vector<std::vector<Trans>> data;
  107.  
  108. std::map <int, std::set <Trans>> Ls;
  109.  
  110. std::vector<Trans> inner1 = { { 1, 0.933 } ,
  111. { 2, 0.865 }, { 3, 0.919 }, { 4, 0.726 }};
  112.  
  113. std::vector<Trans> inner2 = { { 3, 0.906 },
  114. { 2, 0.854 }, { 4, 0.726 } };
  115.  
  116. std::vector<Trans> inner3 = { { 4, 0.865 },
  117. { 3, 0.933 }, { 5, 0.919 } };
  118.  
  119.  
  120. data.push_back(inner1);
  121. data.push_back(inner2);
  122. data.push_back(inner3);
  123.  
  124. std::size_t Msize = 4;
  125. std::size_t MCsize = 0, temp2 = 0;
  126.  
  127. int j = 0;
  128. std::size_t k = 0;
  129. std::map<std::set<Trans>, int> counts;
  130.  
  131. for (std::size_t Lsize = 1; Lsize <= Msize; ++Lsize)
  132. {
  133. for (unsigned i = 0; i < data.size(); ++i)
  134. {
  135.  
  136. //std::size_t k = std::min(Lsize, data[i].size());
  137. if (Lsize > data[i].size())
  138. continue;
  139. else
  140. k = Lsize;
  141.  
  142. do
  143. {
  144. //std::vector<Trans>::iterator li = data[i].begin();
  145.  
  146. std::set<Trans> n_k(data[i].begin(), data[i].begin() + k);
  147.  
  148. // i wan to multiply all probabilities in n_k
  149. std::set<Trans> ::iterator it = n_k.begin();
  150. float Prob = 0;
  151. while (it != n_k.end())
  152. {
  153. Prob *= it->Prob;
  154. ++it;
  155. }
  156.  
  157.  
  158. // std::set<Trans> n_k(li->Item, li->Item);
  159.  
  160. if (Ls.size() != 0)
  161. {
  162. std::map <int, std::set <Trans>> ::iterator ls2 = Ls.begin();
  163.  
  164. while (ls2 != Ls.end())
  165. {
  166. if (std::includes(n_k.begin(), n_k.end(), ls2->second.begin(), ls2->second.end()))
  167. {
  168. ++j;
  169. Ls[j].insert(n_k.begin(), n_k.end());
  170. goto ncom;
  171. }
  172. else
  173. ++ls2;
  174. }
  175. }
  176. counts[n_k] += Prob;
  177. ncom:
  178. std::cout << ""; // If I don't put this statement I will get error: missing {
  179. } while (next_combination(data[i].begin(), data[i].begin() + k, data[i].end()));
  180. }
  181.  
  182.  
  183. MCsize = counts.size();
  184. if (temp2 == MCsize) // check if counts don't have more supset > threshold, then no needs to generate more superset
  185. goto stop;
  186. else
  187. temp2 = MCsize;
  188.  
  189. std::map<std::set<Trans>, int> ::iterator current = counts.begin();
  190.  
  191. while (current != counts.end())
  192. {
  193. if (current->second < threshold)
  194. {
  195. Ls[j].insert(current->first.begin(), current->first.end());
  196. current = counts.erase(current);
  197. ++j;
  198. }
  199. else
  200. ++current;
  201. }
  202.  
  203. }
  204.  
  205.  
  206. stop:
  207. /* for (const auto& p : counts)
  208. {
  209. std::cout << "{";
  210. for (auto e : p.first) {
  211. std::cout << e << " ";
  212. }
  213. std::cout << "} = " << p.second << std::endl;
  214. }*/
  215.  
  216.  
  217. data.clear();
  218.  
  219.  
  220.  
  221.  
  222.  
  223. return 0;
  224. }
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘bool std::includes(_IIter1, _IIter1, _IIter2, _IIter2) [with _IIter1 = std::_Rb_tree_const_iterator<Trans>; _IIter2 = std::_Rb_tree_const_iterator<Trans>]’:
prog.cpp:166:87:   required from here
/usr/include/c++/4.8/bits/stl_algo.h:3589:16: error: no match for ‘operator<’ (operand types are ‘const Trans’ and ‘const Trans’)
  if (*__first2 < *__first1)
                ^
/usr/include/c++/4.8/bits/stl_algo.h:3589:16: note: candidates are:
In file included from /usr/include/c++/4.8/utility:70:0,
                 from /usr/include/c++/4.8/algorithm:60,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:220:5: note: template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
     operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
     ^
/usr/include/c++/4.8/bits/stl_pair.h:220:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3589:16: note:   ‘const Trans’ is not derived from ‘const std::pair<_T1, _T2>’
  if (*__first2 < *__first1)
                ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/algorithm:61,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:297:5: note: template<class _Iterator> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
     operator<(const reverse_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:297:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3589:16: note:   ‘const Trans’ is not derived from ‘const std::reverse_iterator<_Iterator>’
  if (*__first2 < *__first1)
                ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/algorithm:61,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:347:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
     operator<(const reverse_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:347:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3589:16: note:   ‘const Trans’ is not derived from ‘const std::reverse_iterator<_Iterator>’
  if (*__first2 < *__first1)
                ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/algorithm:61,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1055:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&)
     operator<(const move_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1055:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3589:16: note:   ‘const Trans’ is not derived from ‘const std::move_iterator<_Iterator>’
  if (*__first2 < *__first1)
                ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/algorithm:61,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1061:5: note: template<class _Iterator> bool std::operator<(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&)
     operator<(const move_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1061:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3589:16: note:   ‘const Trans’ is not derived from ‘const std::move_iterator<_Iterator>’
  if (*__first2 < *__first1)
                ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2569:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2569:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3589:16: note:   ‘const Trans’ is not derived from ‘const std::basic_string<_CharT, _Traits, _Alloc>’
  if (*__first2 < *__first1)
                ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2581:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
     operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2581:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3589:16: note:   ‘const Trans’ is not derived from ‘const std::basic_string<_CharT, _Traits, _Alloc>’
  if (*__first2 < *__first1)
                ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2593:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator<(const _CharT* __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2593:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3589:16: note:   mismatched types ‘const _CharT*’ and ‘Trans’
  if (*__first2 < *__first1)
                ^
In file included from /usr/include/c++/4.8/vector:64:0,
                 from /usr/include/c++/4.8/bits/random.h:34,
                 from /usr/include/c++/4.8/random:50,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_vector.h:1420:5: note: template<class _Tp, class _Alloc> bool std::operator<(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&)
     operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
     ^
/usr/include/c++/4.8/bits/stl_vector.h:1420:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3589:16: note:   ‘const Trans’ is not derived from ‘const std::vector<_Tp, _Alloc>’
  if (*__first2 < *__first1)
                ^
In file included from /usr/include/c++/4.8/tuple:39:0,
                 from /usr/include/c++/4.8/functional:55,
                 from /usr/include/c++/4.8/bits/stl_algo.h:66,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/array:238:5: note: template<class _Tp, unsigned int _Nm> bool std::operator<(const std::array<_Tp, _Nm>&, const std::array<_Tp, _Nm>&)
     operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b)
     ^
/usr/include/c++/4.8/array:238:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3589:16: note:   ‘const Trans’ is not derived from ‘const std::array<_Tp, _Nm>’
  if (*__first2 < *__first1)
                ^
In file included from /usr/include/c++/4.8/functional:55:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:66,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/tuple:822:5: note: template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const std::tuple<_Elements ...>&, const std::tuple<_Elements ...>&)
     operator<(const tuple<_TElements...>& __t,
     ^
/usr/include/c++/4.8/tuple:822:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3589:16: note:   ‘const Trans’ is not derived from ‘const std::tuple<_Elements ...>’
  if (*__first2 < *__first1)
                ^
In file included from /usr/include/c++/4.8/map:60:0,
                 from prog.cpp:3:
/usr/include/c++/4.8/bits/stl_tree.h:917:5: note: template<class _Key, class _Val, class _KeyOfValue, class _Compare, class _Alloc> bool std::operator<(const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&, const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&)
     operator<(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
     ^
/usr/include/c++/4.8/bits/stl_tree.h:917:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3589:16: note:   ‘const Trans’ is not derived from ‘const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>’
  if (*__first2 < *__first1)
                ^
In file included from /usr/include/c++/4.8/map:61:0,
                 from prog.cpp:3:
/usr/include/c++/4.8/bits/stl_map.h:979:5: note: template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator<(const std::map<_Key, _Tp, _Compare, _Alloc>&, const std::map<_Key, _Tp, _Compare, _Alloc>&)
     operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x,
     ^
/usr/include/c++/4.8/bits/stl_map.h:979:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3589:16: note:   ‘const Trans’ is not derived from ‘const std::map<_Key, _Tp, _Compare, _Alloc>’
  if (*__first2 < *__first1)
                ^
In file included from /usr/include/c++/4.8/map:62:0,
                 from prog.cpp:3:
/usr/include/c++/4.8/bits/stl_multimap.h:881:5: note: template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator<(const std::multimap<_Key, _Tp, _Compare, _Alloc>&, const std::multimap<_Key, _Tp, _Compare, _Alloc>&)
     operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
     ^
/usr/include/c++/4.8/bits/stl_multimap.h:881:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3589:16: note:   ‘const Trans’ is not derived from ‘const std::multimap<_Key, _Tp, _Compare, _Alloc>’
  if (*__first2 < *__first1)
                ^
In file included from /usr/include/c++/4.8/set:61:0,
                 from prog.cpp:4:
/usr/include/c++/4.8/bits/stl_set.h:771:5: note: template<class _Key, class _Compare, class _Alloc> bool std::operator<(const std::set<_Key, _Compare, _Alloc>&, const std::set<_Key, _Compare, _Alloc>&)
     operator<(const set<_Key, _Compare, _Alloc>& __x,
     ^
/usr/include/c++/4.8/bits/stl_set.h:771:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3589:16: note:   ‘const Trans’ is not derived from ‘const std::set<_Key, _Compare, _Alloc>’
  if (*__first2 < *__first1)
                ^
In file included from /usr/include/c++/4.8/set:62:0,
                 from prog.cpp:4:
/usr/include/c++/4.8/bits/stl_multiset.h:756:5: note: template<class _Key, class _Compare, class _Alloc> bool std::operator<(const std::multiset<_Key, _Compare, _Alloc>&, const std::multiset<_Key, _Compare, _Alloc>&)
     operator<(const multiset<_Key, _Compare, _Alloc>& __x,
     ^
/usr/include/c++/4.8/bits/stl_multiset.h:756:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3589:16: note:   ‘const Trans’ is not derived from ‘const std::multiset<_Key, _Compare, _Alloc>’
  if (*__first2 < *__first1)
                ^
/usr/include/c++/4.8/bits/stl_algo.h:3591:20: error: no match for ‘operator<’ (operand types are ‘const Trans’ and ‘const Trans’)
  else if(*__first1 < *__first2)
                    ^
/usr/include/c++/4.8/bits/stl_algo.h:3591:20: note: candidates are:
In file included from /usr/include/c++/4.8/utility:70:0,
                 from /usr/include/c++/4.8/algorithm:60,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:220:5: note: template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
     operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
     ^
/usr/include/c++/4.8/bits/stl_pair.h:220:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3591:20: note:   ‘const Trans’ is not derived from ‘const std::pair<_T1, _T2>’
  else if(*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/algorithm:61,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:297:5: note: template<class _Iterator> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
     operator<(const reverse_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:297:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3591:20: note:   ‘const Trans’ is not derived from ‘const std::reverse_iterator<_Iterator>’
  else if(*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/algorithm:61,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:347:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
     operator<(const reverse_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:347:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3591:20: note:   ‘const Trans’ is not derived from ‘const std::reverse_iterator<_Iterator>’
  else if(*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/algorithm:61,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1055:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&)
     operator<(const move_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1055:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3591:20: note:   ‘const Trans’ is not derived from ‘const std::move_iterator<_Iterator>’
  else if(*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/algorithm:61,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1061:5: note: template<class _Iterator> bool std::operator<(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&)
     operator<(const move_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1061:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3591:20: note:   ‘const Trans’ is not derived from ‘const std::move_iterator<_Iterator>’
  else if(*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2569:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2569:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3591:20: note:   ‘const Trans’ is not derived from ‘const std::basic_string<_CharT, _Traits, _Alloc>’
  else if(*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2581:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
     operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2581:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3591:20: note:   ‘const Trans’ is not derived from ‘const std::basic_string<_CharT, _Traits, _Alloc>’
  else if(*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2593:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator<(const _CharT* __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2593:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3591:20: note:   mismatched types ‘const _CharT*’ and ‘Trans’
  else if(*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/vector:64:0,
                 from /usr/include/c++/4.8/bits/random.h:34,
                 from /usr/include/c++/4.8/random:50,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_vector.h:1420:5: note: template<class _Tp, class _Alloc> bool std::operator<(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&)
     operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
     ^
/usr/include/c++/4.8/bits/stl_vector.h:1420:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3591:20: note:   ‘const Trans’ is not derived from ‘const std::vector<_Tp, _Alloc>’
  else if(*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/tuple:39:0,
                 from /usr/include/c++/4.8/functional:55,
                 from /usr/include/c++/4.8/bits/stl_algo.h:66,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/array:238:5: note: template<class _Tp, unsigned int _Nm> bool std::operator<(const std::array<_Tp, _Nm>&, const std::array<_Tp, _Nm>&)
     operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b)
     ^
/usr/include/c++/4.8/array:238:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3591:20: note:   ‘const Trans’ is not derived from ‘const std::array<_Tp, _Nm>’
  else if(*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/functional:55:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:66,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/tuple:822:5: note: template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const std::tuple<_Elements ...>&, const std::tuple<_Elements ...>&)
     operator<(const tuple<_TElements...>& __t,
     ^
/usr/include/c++/4.8/tuple:822:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3591:20: note:   ‘const Trans’ is not derived from ‘const std::tuple<_Elements ...>’
  else if(*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/map:60:0,
                 from prog.cpp:3:
/usr/include/c++/4.8/bits/stl_tree.h:917:5: note: template<class _Key, class _Val, class _KeyOfValue, class _Compare, class _Alloc> bool std::operator<(const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&, const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&)
     operator<(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
     ^
/usr/include/c++/4.8/bits/stl_tree.h:917:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3591:20: note:   ‘const Trans’ is not derived from ‘const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>’
  else if(*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/map:61:0,
                 from prog.cpp:3:
/usr/include/c++/4.8/bits/stl_map.h:979:5: note: template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator<(const std::map<_Key, _Tp, _Compare, _Alloc>&, const std::map<_Key, _Tp, _Compare, _Alloc>&)
     operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x,
     ^
/usr/include/c++/4.8/bits/stl_map.h:979:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3591:20: note:   ‘const Trans’ is not derived from ‘const std::map<_Key, _Tp, _Compare, _Alloc>’
  else if(*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/map:62:0,
                 from prog.cpp:3:
/usr/include/c++/4.8/bits/stl_multimap.h:881:5: note: template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator<(const std::multimap<_Key, _Tp, _Compare, _Alloc>&, const std::multimap<_Key, _Tp, _Compare, _Alloc>&)
     operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
     ^
/usr/include/c++/4.8/bits/stl_multimap.h:881:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3591:20: note:   ‘const Trans’ is not derived from ‘const std::multimap<_Key, _Tp, _Compare, _Alloc>’
  else if(*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/set:61:0,
                 from prog.cpp:4:
/usr/include/c++/4.8/bits/stl_set.h:771:5: note: template<class _Key, class _Compare, class _Alloc> bool std::operator<(const std::set<_Key, _Compare, _Alloc>&, const std::set<_Key, _Compare, _Alloc>&)
     operator<(const set<_Key, _Compare, _Alloc>& __x,
     ^
/usr/include/c++/4.8/bits/stl_set.h:771:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3591:20: note:   ‘const Trans’ is not derived from ‘const std::set<_Key, _Compare, _Alloc>’
  else if(*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/set:62:0,
                 from prog.cpp:4:
/usr/include/c++/4.8/bits/stl_multiset.h:756:5: note: template<class _Key, class _Compare, class _Alloc> bool std::operator<(const std::multiset<_Key, _Compare, _Alloc>&, const std::multiset<_Key, _Compare, _Alloc>&)
     operator<(const multiset<_Key, _Compare, _Alloc>& __x,
     ^
/usr/include/c++/4.8/bits/stl_multiset.h:756:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:3591:20: note:   ‘const Trans’ is not derived from ‘const std::multiset<_Key, _Compare, _Alloc>’
  else if(*__first1 < *__first2)
                    ^
prog.cpp: In instantiation of ‘bool next_combination(Iterator, Iterator, Iterator) [with Iterator = __gnu_cxx::__normal_iterator<Trans*, std::vector<Trans> >]’:
prog.cpp:179:81:   required from here
prog.cpp:78:15: error: no match for ‘operator<’ (operand types are ‘Trans’ and ‘Trans’)
   if (*--itr1 < *itr2)
               ^
prog.cpp:81:19: error: no match for ‘operator<’ (operand types are ‘Trans’ and ‘Trans’)
    while (!(*itr1 < *j)) ++j;
                   ^
In file included from /usr/include/c++/4.8/string:48:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_function.h: In instantiation of ‘bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = Trans]’:
/usr/include/c++/4.8/bits/stl_tree.h:1422:8:   required from ‘std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_hint_unique_pos(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, const key_type&) [with _Key = Trans; _Val = Trans; _KeyOfValue = std::_Identity<Trans>; _Compare = std::less<Trans>; _Alloc = std::allocator<Trans>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<Trans>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::key_type = Trans]’
/usr/include/c++/4.8/bits/stl_tree.h:1478:64:   required from ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_unique_(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, _Arg&&) [with _Arg = Trans&; _Key = Trans; _Val = Trans; _KeyOfValue = std::_Identity<Trans>; _Compare = std::less<Trans>; _Alloc = std::allocator<Trans>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<Trans>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<Trans>]’
/usr/include/c++/4.8/bits/stl_tree.h:1722:37:   required from ‘void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_unique(_II, _II) [with _InputIterator = __gnu_cxx::__normal_iterator<Trans*, std::vector<Trans> >; _Key = Trans; _Val = Trans; _KeyOfValue = std::_Identity<Trans>; _Compare = std::less<Trans>; _Alloc = std::allocator<Trans>]’
/usr/include/c++/4.8/bits/stl_set.h:165:4:   required from ‘std::set<_Key, _Compare, _Alloc>::set(_InputIterator, _InputIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<Trans*, std::vector<Trans> >; _Key = Trans; _Compare = std::less<Trans>; _Alloc = std::allocator<Trans>]’
prog.cpp:146:61:   required from here
/usr/include/c++/4.8/bits/stl_function.h:235:20: error: no match for ‘operator<’ (operand types are ‘const Trans’ and ‘const Trans’)
       { return __x < __y; }
                    ^
/usr/include/c++/4.8/bits/stl_function.h:235:20: note: candidates are:
In file included from /usr/include/c++/4.8/utility:70:0,
                 from /usr/include/c++/4.8/algorithm:60,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:220:5: note: template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
     operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
     ^
/usr/include/c++/4.8/bits/stl_pair.h:220:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/string:48:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_function.h:235:20: note:   ‘const Trans’ is not derived from ‘const std::pair<_T1, _T2>’
       { return __x < __y; }
                    ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/algorithm:61,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:297:5: note: template<class _Iterator> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
     operator<(const reverse_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:297:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/string:48:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_function.h:235:20: note:   ‘const Trans’ is not derived from ‘const std::reverse_iterator<_Iterator>’
       { return __x < __y; }
                    ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/algorithm:61,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:347:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
     operator<(const reverse_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:347:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/string:48:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_function.h:235:20: note:   ‘const Trans’ is not derived from ‘const std::reverse_iterator<_Iterator>’
       { return __x < __y; }
                    ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/algorithm:61,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1055:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&)
     operator<(const move_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1055:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/string:48:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_function.h:235:20: note:   ‘const Trans’ is not derived from ‘const std::move_iterator<_Iterator>’
       { return __x < __y; }
                    ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/algorithm:61,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1061:5: note: template<class _Iterator> bool std::operator<(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&)
     operator<(const move_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1061:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/string:48:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_function.h:235:20: note:   ‘const Trans’ is not derived from ‘const std::move_iterator<_Iterator>’
       { return __x < __y; }
                    ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2569:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2569:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/string:48:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_function.h:235:20: note:   ‘const Trans’ is not derived from ‘const std::basic_string<_CharT, _Traits, _Alloc>’
       { return __x < __y; }
                    ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2581:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
     operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2581:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/string:48:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_function.h:235:20: note:   ‘const Trans’ is not derived from ‘const std::basic_string<_CharT, _Traits, _Alloc>’
       { return __x < __y; }
                    ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2593:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator<(const _CharT* __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2593:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/string:48:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_function.h:235:20: note:   mismatched types ‘const _CharT*’ and ‘Trans’
       { return __x < __y; }
                    ^
In file included from /usr/include/c++/4.8/vector:64:0,
                 from /usr/include/c++/4.8/bits/random.h:34,
                 from /usr/include/c++/4.8/random:50,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_vector.h:1420:5: note: template<class _Tp, class _Alloc> bool std::operator<(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&)
     operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
     ^
/usr/include/c++/4.8/bits/stl_vector.h:1420:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/string:48:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_function.h:235:20: note:   ‘const Trans’ is not derived from ‘const std::vector<_Tp, _Alloc>’
       { return __x < __y; }
                    ^
In file included from /usr/include/c++/4.8/tuple:39:0,
                 from /usr/include/c++/4.8/functional:55,
                 from /usr/include/c++/4.8/bits/stl_algo.h:66,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/array:238:5: note: template<class _Tp, unsigned int _Nm> bool std::operator<(const std::array<_Tp, _Nm>&, const std::array<_Tp, _Nm>&)
     operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b)
     ^
/usr/include/c++/4.8/array:238:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/string:48:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_function.h:235:20: note:   ‘const Trans’ is not derived from ‘const std::array<_Tp, _Nm>’
       { return __x < __y; }
                    ^
In file included from /usr/include/c++/4.8/functional:55:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:66,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/tuple:822:5: note: template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const std::tuple<_Elements ...>&, const std::tuple<_Elements ...>&)
     operator<(const tuple<_TElements...>& __t,
     ^
/usr/include/c++/4.8/tuple:822:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/string:48:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_function.h:235:20: note:   ‘const Trans’ is not derived from ‘const std::tuple<_Elements ...>’
       { return __x < __y; }
                    ^
In file included from /usr/include/c++/4.8/map:60:0,
                 from prog.cpp:3:
/usr/include/c++/4.8/bits/stl_tree.h:917:5: note: template<class _Key, class _Val, class _KeyOfValue, class _Compare, class _Alloc> bool std::operator<(const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&, const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&)
     operator<(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
     ^
/usr/include/c++/4.8/bits/stl_tree.h:917:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/string:48:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_function.h:235:20: note:   ‘const Trans’ is not derived from ‘const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>’
       { return __x < __y; }
                    ^
In file included from /usr/include/c++/4.8/map:61:0,
                 from prog.cpp:3:
/usr/include/c++/4.8/bits/stl_map.h:979:5: note: template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator<(const std::map<_Key, _Tp, _Compare, _Alloc>&, const std::map<_Key, _Tp, _Compare, _Alloc>&)
     operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x,
     ^
/usr/include/c++/4.8/bits/stl_map.h:979:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/string:48:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_function.h:235:20: note:   ‘const Trans’ is not derived from ‘const std::map<_Key, _Tp, _Compare, _Alloc>’
       { return __x < __y; }
                    ^
In file included from /usr/include/c++/4.8/map:62:0,
                 from prog.cpp:3:
/usr/include/c++/4.8/bits/stl_multimap.h:881:5: note: template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator<(const std::multimap<_Key, _Tp, _Compare, _Alloc>&, const std::multimap<_Key, _Tp, _Compare, _Alloc>&)
     operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
     ^
/usr/include/c++/4.8/bits/stl_multimap.h:881:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/string:48:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_function.h:235:20: note:   ‘const Trans’ is not derived from ‘const std::multimap<_Key, _Tp, _Compare, _Alloc>’
       { return __x < __y; }
                    ^
In file included from /usr/include/c++/4.8/set:61:0,
                 from prog.cpp:4:
/usr/include/c++/4.8/bits/stl_set.h:771:5: note: template<class _Key, class _Compare, class _Alloc> bool std::operator<(const std::set<_Key, _Compare, _Alloc>&, const std::set<_Key, _Compare, _Alloc>&)
     operator<(const set<_Key, _Compare, _Alloc>& __x,
     ^
/usr/include/c++/4.8/bits/stl_set.h:771:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/string:48:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_function.h:235:20: note:   ‘const Trans’ is not derived from ‘const std::set<_Key, _Compare, _Alloc>’
       { return __x < __y; }
                    ^
In file included from /usr/include/c++/4.8/set:62:0,
                 from prog.cpp:4:
/usr/include/c++/4.8/bits/stl_multiset.h:756:5: note: template<class _Key, class _Compare, class _Alloc> bool std::operator<(const std::multiset<_Key, _Compare, _Alloc>&, const std::multiset<_Key, _Compare, _Alloc>&)
     operator<(const multiset<_Key, _Compare, _Alloc>& __x,
     ^
/usr/include/c++/4.8/bits/stl_multiset.h:756:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/string:48:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_function.h:235:20: note:   ‘const Trans’ is not derived from ‘const std::multiset<_Key, _Compare, _Alloc>’
       { return __x < __y; }
                    ^
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h: In instantiation of ‘static bool std::__lexicographical_compare<_BoolType>::__lc(_II1, _II1, _II2, _II2) [with _II1 = std::_Rb_tree_const_iterator<Trans>; _II2 = std::_Rb_tree_const_iterator<Trans>; bool _BoolType = false]’:
/usr/include/c++/4.8/bits/stl_algobase.h:927:29:   required from ‘bool std::__lexicographical_compare_aux(_II1, _II1, _II2, _II2) [with _II1 = std::_Rb_tree_const_iterator<Trans>; _II2 = std::_Rb_tree_const_iterator<Trans>]’
/usr/include/c++/4.8/bits/stl_algobase.h:1102:33:   required from ‘bool std::lexicographical_compare(_II1, _II1, _II2, _II2) [with _II1 = std::_Rb_tree_const_iterator<Trans>; _II2 = std::_Rb_tree_const_iterator<Trans>]’
/usr/include/c++/4.8/bits/stl_tree.h:921:30:   required from ‘bool std::operator<(const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&, const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&) [with _Key = Trans; _Val = Trans; _KeyOfValue = std::_Identity<Trans>; _Compare = std::less<Trans>; _Alloc = std::allocator<Trans>]’
/usr/include/c++/4.8/bits/stl_set.h:773:23:   required from ‘bool std::operator<(const std::set<_Key, _Compare, _Alloc>&, const std::set<_Key, _Compare, _Alloc>&) [with _Key = Trans; _Compare = std::less<Trans>; _Alloc = std::allocator<Trans>]’
/usr/include/c++/4.8/bits/stl_function.h:235:20:   required from ‘bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = std::set<Trans>]’
/usr/include/c++/4.8/bits/stl_map.h:463:31:   required from ‘std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::set<Trans>; _Tp = int; _Compare = std::less<std::set<Trans> >; _Alloc = std::allocator<std::pair<const std::set<Trans>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::set<Trans>]’
prog.cpp:176:15:   required from here
/usr/include/c++/4.8/bits/stl_algobase.h:888:20: error: no match for ‘operator<’ (operand types are ‘const Trans’ and ‘const Trans’)
      if (*__first1 < *__first2)
                    ^
/usr/include/c++/4.8/bits/stl_algobase.h:888:20: note: candidates are:
In file included from /usr/include/c++/4.8/utility:70:0,
                 from /usr/include/c++/4.8/algorithm:60,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:220:5: note: template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
     operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
     ^
/usr/include/c++/4.8/bits/stl_pair.h:220:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:888:20: note:   ‘const Trans’ is not derived from ‘const std::pair<_T1, _T2>’
      if (*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/algorithm:61,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:297:5: note: template<class _Iterator> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
     operator<(const reverse_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:297:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:888:20: note:   ‘const Trans’ is not derived from ‘const std::reverse_iterator<_Iterator>’
      if (*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/algorithm:61,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:347:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
     operator<(const reverse_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:347:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:888:20: note:   ‘const Trans’ is not derived from ‘const std::reverse_iterator<_Iterator>’
      if (*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/algorithm:61,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1055:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&)
     operator<(const move_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1055:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:888:20: note:   ‘const Trans’ is not derived from ‘const std::move_iterator<_Iterator>’
      if (*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/algorithm:61,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1061:5: note: template<class _Iterator> bool std::operator<(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&)
     operator<(const move_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1061:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:888:20: note:   ‘const Trans’ is not derived from ‘const std::move_iterator<_Iterator>’
      if (*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2569:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2569:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:888:20: note:   ‘const Trans’ is not derived from ‘const std::basic_string<_CharT, _Traits, _Alloc>’
      if (*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2581:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
     operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2581:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:888:20: note:   ‘const Trans’ is not derived from ‘const std::basic_string<_CharT, _Traits, _Alloc>’
      if (*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/string:52:0,
                 from /usr/include/c++/4.8/random:41,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/basic_string.h:2593:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator<(const _CharT* __lhs,
     ^
/usr/include/c++/4.8/bits/basic_string.h:2593:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:888:20: note:   mismatched types ‘const _CharT*’ and ‘Trans’
      if (*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/vector:64:0,
                 from /usr/include/c++/4.8/bits/random.h:34,
                 from /usr/include/c++/4.8/random:50,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_vector.h:1420:5: note: template<class _Tp, class _Alloc> bool std::operator<(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&)
     operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
     ^
/usr/include/c++/4.8/bits/stl_vector.h:1420:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:888:20: note:   ‘const Trans’ is not derived from ‘const std::vector<_Tp, _Alloc>’
      if (*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/tuple:39:0,
                 from /usr/include/c++/4.8/functional:55,
                 from /usr/include/c++/4.8/bits/stl_algo.h:66,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/array:238:5: note: template<class _Tp, unsigned int _Nm> bool std::operator<(const std::array<_Tp, _Nm>&, const std::array<_Tp, _Nm>&)
     operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b)
     ^
/usr/include/c++/4.8/array:238:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:888:20: note:   ‘const Trans’ is not derived from ‘const std::array<_Tp, _Nm>’
      if (*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/functional:55:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:66,
                 from /usr/include/c++/4.8/algorithm:62,
                 from prog.cpp:1:
/usr/include/c++/4.8/tuple:822:5: note: template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const std::tuple<_Elements ...>&, const std::tuple<_Elements ...>&)
     operator<(const tuple<_TElements...>& __t,
     ^
/usr/include/c++/4.8/tuple:822:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:888:20: note:   ‘const Trans’ is not derived from ‘const std::tuple<_Elements ...>’
      if (*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/map:60:0,
                 from prog.cpp:3:
/usr/include/c++/4.8/bits/stl_tree.h:917:5: note: template<class _Key, class _Val, class _KeyOfValue, class _Compare, class _Alloc> bool std::operator<(const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&, const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&)
     operator<(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
     ^
/usr/include/c++/4.8/bits/stl_tree.h:917:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:888:20: note:   ‘const Trans’ is not derived from ‘const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>’
      if (*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/map:61:0,
                 from prog.cpp:3:
/usr/include/c++/4.8/bits/stl_map.h:979:5: note: template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator<(const std::map<_Key, _Tp, _Compare, _Alloc>&, const std::map<_Key, _Tp, _Compare, _Alloc>&)
     operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x,
     ^
/usr/include/c++/4.8/bits/stl_map.h:979:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:888:20: note:   ‘const Trans’ is not derived from ‘const std::map<_Key, _Tp, _Compare, _Alloc>’
      if (*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/map:62:0,
                 from prog.cpp:3:
/usr/include/c++/4.8/bits/stl_multimap.h:881:5: note: template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator<(const std::multimap<_Key, _Tp, _Compare, _Alloc>&, const std::multimap<_Key, _Tp, _Compare, _Alloc>&)
     operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
     ^
/usr/include/c++/4.8/bits/stl_multimap.h:881:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:888:20: note:   ‘const Trans’ is not derived from ‘const std::multimap<_Key, _Tp, _Compare, _Alloc>’
      if (*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/set:61:0,
                 from prog.cpp:4:
/usr/include/c++/4.8/bits/stl_set.h:771:5: note: template<class _Key, class _Compare, class _Alloc> bool std::operator<(const std::set<_Key, _Compare, _Alloc>&, const std::set<_Key, _Compare, _Alloc>&)
     operator<(const set<_Key, _Compare, _Alloc>& __x,
     ^
/usr/include/c++/4.8/bits/stl_set.h:771:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:888:20: note:   ‘const Trans’ is not derived from ‘const std::set<_Key, _Compare, _Alloc>’
      if (*__first1 < *__first2)
                    ^
In file included from /usr/include/c++/4.8/set:62:0,
                 from prog.cpp:4:
/usr/include/c++/4.8/bits/stl_multiset.h:756:5: note: template<class _Key, class _Compare, class _Alloc> bool std::operator<(const std::multiset<_Key, _Compare, _Alloc>&, const std::multiset<_Key, _Compare, _Alloc>&)
     operator<(const multiset<_Key, _Compare, _Alloc>& __x,
     ^
/usr/include/c++/4.8/bits/stl_multiset.h:756:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:888:20: note:   ‘const Trans’ is not derived from ‘const std::multiset<_Key, _Compare, _Alloc>’
      if (*__first1 < *__first2)
                    ^
/usr/include/c++/4.8/bits/stl_algobase.h:890:20: error: no match for ‘operator<’ (operand types are ‘const Trans’ and ‘const Trans’)
      if (*__first2 < *__first1)
                    ^
/usr/include/c++/4.8/bits/stl_algobase.h:890:20: note: candidates are:
In file included from /usr/include/c++/4.8/utility:70:0,
                 from /usr/include/c++/4.8/algorithm:60,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:220:5: note: template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
     operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
     ^
/usr/include/c++/4.8/bits/stl_pair.h:220:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:890:20: note:   ‘const Trans’ is not derived from ‘const std::pair<_T1, _T2>’
      if (*__first2 < *__first1)
                    ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/algorithm:61,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:297:5: note: template<class _Iterator> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
     operator<(const reverse_iterator<_Iterator>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:297:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:890:20: note:   ‘const Trans’ is not derived from ‘const std::reverse_iterator<_Iterator>’
      if (*__first2 < *__first1)
                    ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/algorithm:61,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:347:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
     operator<(const reverse_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:347:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:890:20: note:   ‘const Trans’ is not derived from ‘const std::reverse_iterator<_Iterator>’
      if (*__first2 < *__first1)
                    ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/algorithm:61,
                 from prog.cpp:1:
/usr/include/c++/4.8/bits/stl_iterator.h:1055:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&)
     operator<(const move_iterator<_IteratorL>& __x,
     ^
/usr/include/c++/4.8/bits/stl_iterator.h:1055:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.8/algorithm:61:0,
                 from prog.cpp:1:
/usr/in
stdout
Standard output is empty