Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  vector<long>A(N);
  for(int i=0;i<N;i++)cin>>A[i];
  int s;
  vector<long>B(N);
  for(int i=0;i<N;i++){
    B[i]=bitset(A[i]);
  }
  for(int i=0;i<N;i++){
    for(int j=i+1;j<N;j++){
     s+=( B[i]^B[j])%1000000007;
      s%=1000000007
    }
  }
  cout<<s<<endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: class template argument deduction failed:
   11 |     B[i]=bitset(A[i]);
      |                     ^
a.cc:11:21: error: no matching function for call to 'bitset(__gnu_cxx::__alloc_traits<std::allocator<long int>, long int>::value_type&)'
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bitset:1020:9: note: candidate: 'template<long unsigned int _Nb, class _CharT> bitset(const _CharT*, typename std::__bitset::__string<_CharT>::size_type, _CharT, _CharT)-> std::bitset<_Nb>'
 1020 |         bitset(const _CharT* __str,
      |         ^~~~~~
/usr/include/c++/14/bitset:1020:9: note:   template argument deduction/substitution failed:
a.cc:11:21: note:   mismatched types 'const _CharT*' and 'long int'
   11 |     B[i]=bitset(A[i]);
      |                     ^
/usr/include/c++/14/bitset:996:9: note: candidate: 'template<long unsigned int _Nb, class _CharT, class _Traits, class _Alloc> bitset(const std::__cxx11::basic_string<_Ch_type, _St, _Sa>&, std::size_t, std::size_t, _CharT, _CharT)-> std::bitset<_Nb>'
  996 |         bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s,
      |         ^~~~~~
/usr/include/c++/14/bitset:996:9: note:   candidate expects 4 arguments, 1 provided
/usr/include/c++/14/bitset:984:9: note: candidate: 'template<long unsigned int _Nb, class _CharT, class _Traits, class _Alloc> bitset(const std::__cxx11::basic_string<_Ch_type, _St, _Sa>&, std::size_t, std::size_t)-> std::bitset<_Nb>'
  984 |         bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s,
      |         ^~~~~~
/usr/include/c++/14/bitset:984:9: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bitset:962:9: note: candidate: 'template<long unsigned int _Nb, class _CharT, class _Traits, class _Alloc> bitset(const std::__cxx11::basic_string<_Ch_type, _St, _Sa>&, std::size_t)-> std::bitset<_Nb>'
  962 |         bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s,
      |         ^~~~~~
/usr/include/c++/14/bitset:962:9: note:   template argument deduction/substitution failed:
a.cc:11:21: note:   mismatched types 'const std::__cxx11::basic_string<_Ch_type, _St, _Sa>' and '__gnu_cxx::__alloc_traits<std::allocator<long int>, long int>::value_type' {aka 'long int'}
   11 |     B[i]=bitset(A[i]);
      |                     ^
/usr/include/c++/14/bitset:941:17: note: candidate: 'template<long unsigned int _Nb> bitset(long long unsigned int)-> std::bitset<_Nb>'
  941 |       constexpr bitset(unsigned long long __val) noexcept
      |                 ^~~~~~
/usr/include/c++/14/bitset:941:17: note:   template argument deduction/substitution failed:
a.cc:11:21: note:   couldn't deduce template parameter '_Nb'
   11 |     B[i]=bitset(A[i]);
      |                     ^
/usr/include/c++/14/bitset:936:26: note: candidate: 'template<long unsigned int _Nb> bitset()-> std::bitset<_Nb>'
  936 |       _GLIBCXX_CONSTEXPR bitset() _GLIBCXX_NOEXCEPT
      |                          ^~~~~~
/usr/include/c++/14/bitset:936:26: note:   candidate expects 0 arguments, 1 provided
/usr/include/c++/14/bitset:804:11: note: candidate: 'template<long unsigned int _Nb> bitset(std::bitset<_Nb>)-> std::bitset<_Nb>'
  804 |     class bitset
      |           ^~~~~~
/usr/include/c++/14/bitset:804:11: note:   template argument deduction/substitution failed:
a.cc:11:21: note:   mismatched types 'std::bitset<_Nb>' and 'long int'
   11 |     B[i]=bitset(A[i]);
      |                     ^
a.cc:16:20: error: expected ';' before '}' token
   16 |       s%=1000000007
      |                    ^
      |                    ;
   17 |     }
      |     ~