运行 ID: 23906

Main.cc: In function ‘long long int ff(long long int*, long long int)’:
Main.cc:22:30: error: invalid conversion from ‘long long int’ to ‘long long int*’ [-fpermissive]
  return f[x]==x?x:f[x]=ff(f[x]);
                           ~~~^
Main.cc:22:31: error: too few arguments to function ‘long long int ff(long long int*, long long int)’
  return f[x]==x?x:f[x]=ff(f[x]);
                               ^
Main.cc:21:12: note: declared here
 inline int ff(int *f,int x){
            ^~
Main.cc: At global scope:
Main.cc:29:5: error: redefinition of ‘long long int A’
 int A,B,C;
     ^
Main.cc:24:5: note: ‘long long int A’ previously declared here
 int A,B,C;
     ^
Main.cc:29:7: error: redefinition of ‘long long int B’
 int A,B,C;
       ^
Main.cc:24:7: note: ‘long long int B’ previously declared here
 int A,B,C;
       ^
Main.cc:29:9: error: redefinition of ‘long long int C’
 int A,B,C;
         ^
Main.cc:24:9: note: ‘long long int C’ previously declared here
 int A,B,C;
         ^
Main.cc:56:8: error: redefinition of ‘struct node’
 struct node{
        ^~~~
Main.cc:12:8: note: previous definition of ‘struct node’
 struct node{
        ^~~~
Main.cc: In function ‘void pd(long long int, long long int, long long int)’:
Main.cc:70:14: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
     int mid=l+r>>1;
             ~^~
Main.cc:75:15: error: cannot convert ‘’ to ‘int’ in assignment
     tg[x]={0,0};
               ^
Main.cc: In function ‘void mod(long long int, long long int, long long int, long long int, long long int, node)’:
Main.cc:83:20: error: no match for ‘operator+’ (operand types are ‘int’ and ‘node’)
         tg[x]=tg[x]+A;
               ~~~~~^~
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/ios:40,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/bits/stl_iterator.h:400:5: note: candidate: template std::reverse_iterator<_Iterator> std::operator+(typename std::reverse_iterator<_Iterator>::difference_type, const std::reverse_iterator<_Iterator>&)
     operator+(typename reverse_iterator<_Iterator>::difference_type __n,
     ^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:400:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   ‘node’ is not derived from ‘const std::reverse_iterator<_Iterator>’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/ios:40,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/bits/stl_iterator.h:1201:5: note: candidate: template std::move_iterator<_IteratorL> std::operator+(typename std::move_iterator<_IteratorL>::difference_type, const std::move_iterator<_IteratorL>&)
     operator+(typename move_iterator<_Iterator>::difference_type __n,
     ^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:1201:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   ‘node’ is not derived from ‘const std::move_iterator<_IteratorL>’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/string:52:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/bits/basic_string.h:5888:5: note: candidate: template std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:5888:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   mismatched types ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/string:53:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/bits/basic_string.tcc:1157:5: note: candidate: template std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
     operator+(const _CharT* __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.tcc:1157:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   mismatched types ‘const _CharT*’ and ‘int’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/string:53:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/bits/basic_string.tcc:1173:5: note: candidate: template std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(_CharT, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
     operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs)
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.tcc:1173:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   ‘node’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/string:52:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/bits/basic_string.h:5925:5: note: candidate: template std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:5925:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   mismatched types ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/string:52:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/bits/basic_string.h:5941:5: note: candidate: template std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, _CharT)
     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:5941:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   mismatched types ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/string:52:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/bits/basic_string.h:5953:5: note: candidate: template std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
     operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:5953:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   mismatched types ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/string:52:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/bits/basic_string.h:5959:5: note: candidate: template std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&)
     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:5959:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   mismatched types ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/string:52:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/bits/basic_string.h:5965:5: note: candidate: template std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&)
     operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:5965:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   mismatched types ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/string:52:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/bits/basic_string.h:5977:5: note: candidate: template std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const _CharT*, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&)
     operator+(const _CharT* __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:5977:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   mismatched types ‘const _CharT*’ and ‘int’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/string:52:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/bits/basic_string.h:5983:5: note: candidate: template std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(_CharT, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&)
     operator+(_CharT __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:5983:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   ‘node’ is not derived from ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/string:52:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/bits/basic_string.h:5989:5: note: candidate: template std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _CharT*)
     operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:5989:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   mismatched types ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/string:52:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/bits/basic_string.h:5995:5: note: candidate: template std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, _CharT)
     operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:5995:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   mismatched types ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/ccomplex:39:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/complex:326:5: note: candidate: template std::complex<_Tp> std::operator+(const std::complex<_Tp>&, const std::complex<_Tp>&)
     operator+(const complex<_Tp>& __x, const complex<_Tp>& __y)
     ^~~~~~~~
/usr/include/c++/7/complex:326:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   mismatched types ‘const std::complex<_Tp>’ and ‘int’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/ccomplex:39:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/complex:335:5: note: candidate: template std::complex<_Tp> std::operator+(const std::complex<_Tp>&, const _Tp&)
     operator+(const complex<_Tp>& __x, const _Tp& __y)
     ^~~~~~~~
/usr/include/c++/7/complex:335:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   mismatched types ‘const std::complex<_Tp>’ and ‘int’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/ccomplex:39:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/complex:344:5: note: candidate: template std::complex<_Tp> std::operator+(const _Tp&, const std::complex<_Tp>&)
     operator+(const _Tp& __x, const complex<_Tp>& __y)
     ^~~~~~~~
/usr/include/c++/7/complex:344:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   ‘node’ is not derived from ‘const std::complex<_Tp>’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/ccomplex:39:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/complex:445:5: note: candidate: template std::complex<_Tp> std::operator+(const std::complex<_Tp>&)
     operator+(const complex<_Tp>& __x)
     ^~~~~~~~
/usr/include/c++/7/complex:445:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   mismatched types ‘const std::complex<_Tp>’ and ‘int’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/deque:64:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:68,
                 from Main.cc:1:
/usr/include/c++/7/bits/stl_deque.h:374:5: note: candidate: template std::_Deque_iterator<_Tp, _Ref, _Ptr> std::operator+(std::ptrdiff_t, const std::_Deque_iterator<_Tp, _Ref, _Ptr>&)
     operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Ref, _Ptr>& __x)
     ^~~~~~~~
/usr/include/c++/7/bits/stl_deque.h:374:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   ‘node’ is not derived from ‘const std::_Deque_iterator<_Tp, _Ref, _Ptr>’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/vector:65:0,
                 from /usr/include/c++/7/queue:61,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:86,
                 from Main.cc:1:
/usr/include/c++/7/bits/stl_bvector.h:297:3: note: candidate: std::_Bit_iterator std::operator+(std::ptrdiff_t, const std::_Bit_iterator&)
   operator+(ptrdiff_t __n, const _Bit_iterator& __x)
   ^~~~~~~~
/usr/include/c++/7/bits/stl_bvector.h:297:3: note:   no known conversion for argument 2 from ‘node’ to ‘const std::_Bit_iterator&’
/usr/include/c++/7/bits/stl_bvector.h:387:3: note: candidate: std::_Bit_const_iterator std::operator+(std::ptrdiff_t, const std::_Bit_const_iterator&)
   operator+(ptrdiff_t __n, const _Bit_const_iterator& __x)
   ^~~~~~~~
/usr/include/c++/7/bits/stl_bvector.h:387:3: note:   no known conversion for argument 2 from ‘node’ to ‘const std::_Bit_const_iterator&’
In file included from /usr/include/c++/7/valarray:592:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:95,
                 from Main.cc:1:
/usr/include/c++/7/bits/valarray_after.h:402:5: note: candidate: template std::_Expr, typename std::__fun::result_type> std::operator+(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::_Expr<_Dom2, typename _Dom2::value_type>&)
     _DEFINE_EXPR_BINARY_OPERATOR(+, __plus)
     ^
/usr/include/c++/7/bits/valarray_after.h:402:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   mismatched types ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’ and ‘int’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/valarray:592:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:95,
                 from Main.cc:1:
/usr/include/c++/7/bits/valarray_after.h:402:5: note: candidate: template std::_Expr, typename std::__fun::result_type> std::operator+(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)
     _DEFINE_EXPR_BINARY_OPERATOR(+, __plus)
     ^
/usr/include/c++/7/bits/valarray_after.h:402:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   mismatched types ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’ and ‘int’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/valarray:592:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:95,
                 from Main.cc:1:
/usr/include/c++/7/bits/valarray_after.h:402:5: note: candidate: template std::_Expr, typename std::__fun::result_type> std::operator+(const typename _Dom::value_type&, const std::_Expr<_Dom1, typename _Dom1::value_type>&)
     _DEFINE_EXPR_BINARY_OPERATOR(+, __plus)
     ^
/usr/include/c++/7/bits/valarray_after.h:402:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   ‘node’ is not derived from ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/valarray:592:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:95,
                 from Main.cc:1:
/usr/include/c++/7/bits/valarray_after.h:402:5: note: candidate: template std::_Expr, typename std::__fun::result_type> std::operator+(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::valarray&)
     _DEFINE_EXPR_BINARY_OPERATOR(+, __plus)
     ^
/usr/include/c++/7/bits/valarray_after.h:402:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   mismatched types ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’ and ‘int’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/c++/7/valarray:592:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:95,
                 from Main.cc:1:
/usr/include/c++/7/bits/valarray_after.h:402:5: note: candidate: template std::_Expr, typename std::__fun::result_type> std::operator+(const std::valarray&, const std::_Expr<_Dom1, typename _Dom1::value_type>&)
     _DEFINE_EXPR_BINARY_OPERATOR(+, __plus)
     ^
/usr/include/c++/7/bits/valarray_after.h:402:5: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   ‘node’ is not derived from ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:95:0,
                 from Main.cc:1:
/usr/include/c++/7/valarray:1172:1: note: candidate: template std::_Expr, typename std::__fun::result_type> std::operator+(const std::valarray<_Tp>&, const std::valarray<_Tp>&)
 _DEFINE_BINARY_OPERATOR(+, __plus)
 ^
/usr/include/c++/7/valarray:1172:1: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   mismatched types ‘const std::valarray<_Tp>’ and ‘int’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:95:0,
                 from Main.cc:1:
/usr/include/c++/7/valarray:1172:1: note: candidate: template std::_Expr, typename std::__fun::result_type> std::operator+(const std::valarray<_Tp>&, const _Tp&)
 _DEFINE_BINARY_OPERATOR(+, __plus)
 ^
/usr/include/c++/7/valarray:1172:1: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   mismatched types ‘const std::valarray<_Tp>’ and ‘int’
         tg[x]=tg[x]+A;
                     ^
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:95:0,
                 from Main.cc:1:
/usr/include/c++/7/valarray:1172:1: note: candidate: template std::_Expr, typename std::__fun::result_type> std::operator+(const _Tp&, const std::valarray<_Tp>&)
 _DEFINE_BINARY_OPERATOR(+, __plus)
 ^
/usr/include/c++/7/valarray:1172:1: note:   template argument deduction/substitution failed:
Main.cc:83:21: note:   ‘node’ is not derived from ‘const std::valarray<_Tp>’
         tg[x]=tg[x]+A;
                     ^
Main.cc:84:20: error: no match for ‘operator*’ (operand types are ‘node’ and ‘long long int’)
         w[x]=w[x]+A*(r-l+1);
                   ~^~~~~~~~
In file included from /usr/include/c++/7/ccomplex:39:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/complex:386:5: note: candidate: template std::complex<_Tp> std::operator*(const std::complex<_Tp>&, const std::complex<_Tp>&)
     operator*(const complex<_Tp>& __x, const complex<_Tp>& __y)
     ^~~~~~~~
/usr/include/c++/7/complex:386:5: note:   template argument deduction/substitution failed:
Main.cc:84:27: note:   ‘node’ is not derived from ‘const std::complex<_Tp>’
         w[x]=w[x]+A*(r-l+1);
                           ^
In file included from /usr/include/c++/7/ccomplex:39:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/complex:395:5: note: candidate: template std::complex<_Tp> std::operator*(const std::complex<_Tp>&, const _Tp&)
     operator*(const complex<_Tp>& __x, const _Tp& __y)
     ^~~~~~~~
/usr/include/c++/7/complex:395:5: note:   template argument deduction/substitution failed:
Main.cc:84:27: note:   ‘node’ is not derived from ‘const std::complex<_Tp>’
         w[x]=w[x]+A*(r-l+1);
                           ^
In file included from /usr/include/c++/7/ccomplex:39:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from Main.cc:1:
/usr/include/c++/7/complex:404:5: note: candidate: template std::complex<_Tp> std::operator*(const _Tp&, const std::complex<_Tp>&)
     operator*(const _Tp& __x, const complex<_Tp>& __y)
     ^~~~~~~~
/usr/include/c++/7/complex:404:5: note:   template argument deduction/substitution failed:
Main.cc:84:27: note:   mismatched types ‘const std::complex<_Tp>’ and ‘long long int’