Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	long long n;
	scanf("%lld",&n);
	map<string,long long>s;
	getchar();
	for(long long j=0;j<n;j++){
		char ss[10];
		for(long long i=0;i<10;i++){
			ss[i]=getchar();
		}
		getchar();
		sort(ss,ss+10);
		string l;
		for(long long i=0;i<10;i++){
			l+=ss[i];
		}
		s[l]++;
	}
	long long sum=0;
	map<string,int>::iterator it;
	for(it=s.begin();it!=s.end();it++){
		if(it->second>1){
			for(long long i=1;i<it->second;i++){
				sum+=i;
			}
		}
	}
	printf("%lld",sum);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:24: error: no match for 'operator=' (operand types are 'std::map<std::__cxx11::basic_string<char>, int>::iterator' {aka 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> > >::iterator'} and 'std::map<std::__cxx11::basic_string<char>, long long int>::iterator' {aka 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, long long int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, long long int> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, long long int> > >::iterator'})
   23 |         for(it=s.begin();it!=s.end();it++){
      |                        ^
In file included from /usr/include/c++/14/map:62,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_tree.h:252:12: note: candidate: 'constexpr std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, int> >& std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, int> >::operator=(const std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, int> >&)'
  252 |     struct _Rb_tree_iterator
      |            ^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_tree.h:252:12: note:   no known conversion for argument 1 from 'std::map<std::__cxx11::basic_string<char>, long long int>::iterator' {aka 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, long long int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, long long int> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, long long int> > >::iterator'} to 'const std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, int> >&'
/usr/include/c++/14/bits/stl_tree.h:252:12: note: candidate: 'constexpr std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, int> >& std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, int> >::operator=(std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, int> >&&)'
/usr/include/c++/14/bits/stl_tree.h:252:12: note:   no known conversion for argument 1 from 'std::map<std::__cxx11::basic_string<char>, long long int>::iterator' {aka 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, long long int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, long long int> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, long long int> > >::iterator'} to 'std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, int> >&&'
a.cc:23:28: error: no match for 'operator!=' (operand types are 'std::map<std::__cxx11::basic_string<char>, int>::iterator' {aka 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> > >::iterator'} and 'std::map<std::__cxx11::basic_string<char>, long long int>::iterator' {aka 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, long long int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, long long int> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, long long int> > >::iterator'})
   23 |         for(it=s.begin();it!=s.end();it++){
      |                          ~~^~~~~~~~~
      |                          |        |
      |                          |        _Rb_tree_iterator<pair<[...],long long int>>
      |                          _Rb_tree_iterator<pair<[...],int>>
In file included from /usr/include/c++/14/regex:68,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181:
/usr/include/c++/14/bits/regex.h:1132:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator!=(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
 1132 |     operator!=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1132:5: note:   template argument deduction/substitution failed:
a.cc:23:36: note:   'std::map<std::__cxx11::basic_string<char>, int>::iterator' {aka 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> > >::iterator'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
   23 |         for(it=s.begin();it!=s.end();it++){
      |                                    ^
/usr/include/c++/14/bits/regex.h:1212:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator!=(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
 1212 |     operator!=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1212:5: note:   template argument deduction/substitution failed:
a.cc:23:36: note:   'std::map<std::__cxx11::basic_string<char>, int>::iterator' {aka 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> > >::iterator'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
   23 |         for(it=s.begin();it!=s.end();it++){
      |                                    ^
/usr/include/c++/14/bits/regex.h:1305:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator!=(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
 1305 |     operator!=(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1305:5: note:   template argument deduction/substitution failed:
a.cc:23:36: note:   'std::map<std::__cxx11::basic_string<char>, int>::iterator' {aka 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> > >::iterator'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
   23 |         for(it=s.begin();it!=s.end();it++){
      |                                    ^
/usr/include/c++/14/bits/regex.h:1379:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
 1379 |     operator!=(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1379:5: note:   template argument deduction/substitution failed:
a.cc:23:36: note:   'std::map<std::__cxx11::basic_string<char>, long long int>::iterator' {aka 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, long long int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, long long int> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, long long int> > >::iterator'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
   23 |         for(it=s.begin();it!=s.end();it++){
      |                                    ^
/usr/include/c++/14/bits/regex.h:1473:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
 1473 |     operator!=(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1473:5: note:   template argument deduction/substitution failed:
a.cc:23:36: note:   'std::map<std::__cxx11::basic_string<char>, int>::iterator' {aka 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> > >::iterator'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
   23 |         for(it=s.begin();it!=s.end();it++){
      |                                    ^
/usr/include/c++/14/bits/regex.h:1547:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator!=(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
 1547 |     operator!=(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1547:5: note:   template argument deduction/substitution failed:
a.cc:23:36: note:   'std::map<std::__cxx11::basic_string<char>, long long int>::iterator' {aka 'std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, long long int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, long long int> >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, long long int> > >::iterator'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
   23 |         for(it=s.begin();it!=s.end();it++){
      |                                    ^
/usr/include/c++/14/bits/regex.h:1647:5: note: candidate: