/in/foo.cc:62:21: warning: multi-character character constant [-Wmultichar]
62 | else if(op=='Sub') cin>>k,modify(1,x,y,-k);
| ^~~~~
/in/foo.cc: In function 'void build(long long int, long long int, long long int)':
/in/foo.cc:28:14: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
28 | int mid=l+r>>1;
| ~^~
/in/foo.cc: In function 'void modify(long long int, long long int, long long int, long long int)':
/in/foo.cc:40:20: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
40 | int mid=tr[u].l+tr[u].r>>1;
| ~~~~~~~^~~~~~~~
/in/foo.cc: In function 'long long int query(long long int, long long int, long long int)':
/in/foo.cc:46:15: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
46 | if(tr[u].l>=l&tr[u].r<=r) return tr[u].sum;
| ~~~~~~~^~~
/in/foo.cc:48:20: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
48 | int mid=tr[u].l+tr[u].r>>1,res=0;
| ~~~~~~~^~~~~~~~
/in/foo.cc: In function 'void solve()':
/in/foo.cc:62:19: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
62 | else if(op=='Sub') cin>>k,modify(1,x,y,-k);
| ~~^~~~~~~
| | |
| | int
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/12/regex:66,
from /usr/include/x86_64-linux-gnu/c++/12/bits/stdc++.h:110,
from /in/foo.cc:1:
/usr/include/c++/12/bits/regex.h:1063:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1063 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1063:5: note: template argument deduction/substitution failed:
/in/foo.cc:62:21: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
62 | else if(op=='Sub') cin>>k,modify(1,x,y,-k);
| ^~~~~
/usr/include/c++/12/bits/regex.h:1159: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>&)'
1159 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1159:5: note: template argument deduction/substitution failed:
/in/foo.cc:62:21: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
62 | else if(op=='Sub') cin>>k,modify(1,x,y,-k);
| ^~~~~
/usr/include/c++/12/bits/regex.h:1234: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>&)'
1234 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1234:5: note: template argument deduction/substitution failed:
/in/foo.cc:62:21: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
62 | else if(op=='Sub') cin>>k,modify(1,x,y,-k);
| ^~~~~
/usr/include/c++/12/bits/regex.h:1326:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1326 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1326:5: note: template argument deduction/substitution failed:
/in/foo.cc:62:21: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
62 | else if(op=='Sub') cin>>k,modify(1,x,y,-k);
| ^~~~~
/usr/include/c++/12/bits/regex.h:1401:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1401 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1401:5: note: template argument deduction/substitution failed:
/in/foo.cc:62:21: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
62 | else if(op=='Sub') cin>>k,modify(1,x,y,-k);
| ^~~~~
/usr/include/c++/12/bits/regex.h:1494:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1494 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1494:5: note: template argument deduction/substitution failed:
/in/foo.cc:62:21: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
62 | else if(op=='Sub') cin>>k,modify(1,x,y,-k);
| ^~~~~
/usr/include/c++/12/bits/regex.h:1573:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1573 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1573:5: note: template argument deduction/substitution failed:
/in/foo.cc:62:21: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
62 | else if(op=='Sub') cin>>k,modify(1,x,y,-k);
| ^~~~~
/usr/include/c++/12/bits/regex.h:2131:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)'
2131 | operator==(const match_results<_Bi_iter, _Alloc>& __m1,
| ^~~~~~~~
/usr/include/c++/12/bits/regex.h:2131:5: note: template argument deduction/substitution failed:
/in/foo.cc:62:21: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>'
62 | else if(op=='Sub') cin>>k,modify(1,x,y,-k);
| ^~~~~
In file included from /usr/include/c++/12/iosfwd:40,
from /usr/include/c++/12/ios:38,
from /usr/include/c++/12/istream:38,
from /usr/include/c++/12/sstream:38,
from /usr/include/c++/12/complex:45,
from /usr/include/c++/12/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/12/bits/stdc++.h:54:
/usr/include/c++/12/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/12/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
/in/foo.cc:62:21: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>'
62 | else if(op=='Sub') cin>>k,modify(1,x,y,-k);
| ^~~~~
In file included from /usr/include/c++/12/string:41,
from /usr/include/c++/12/bits/locale_classes.h:40,
from /usr/include/c++/12/bits/ios_base.h:41,
from /usr/include/c++/12/ios:42:
/usr/include/c++/12/bits/allocator.h:219:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
219 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/12/bits/allocator.h:219:5: note: template argument deduction/substitution failed:
/in/foo.cc:62:21: note: 'std::string' {a