Main.cc:11:29: error: ‘int div [20005]’ redeclared as different kind of symbol
int tmp [20005] , div [20005] , rsl [20005] ;
^
In file included from /usr/include/c++/7/bits/std_abs.h:38:0,
from /usr/include/c++/7/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
from Main.cc:1:
/usr/include/stdlib.h:849:14: note: previous declaration ‘div_t div(int, int)’
extern div_t div (int __numer, int __denom)
^~~
Main.cc: In function ‘bool cmp(ppl, ppl)’:
Main.cc:14:15: error: no match for ‘operator*’ (operand types are ‘ppl’ and ‘int’)
return a , a * a . b < b . a * b . b ;
~~^~~~~~~
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:14:21: note: ‘ppl’ is not derived from ‘const std::complex<_Tp>’
return a , a * a . b < b . a * b . b ;
^
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:14:21: note: ‘ppl’ is not derived from ‘const std::complex<_Tp>’
return a , a * a . b < b . a * b . b ;
^
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:14:21: note: mismatched types ‘const std::complex<_Tp>’ and ‘int’
return a , a * a . b < b . a * b . b ;
^
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:404: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(*, __multiplies)
^
/usr/include/c++/7/bits/valarray_after.h:404:5: note: template argument deduction/substitution failed:
Main.cc:14:21: note: ‘ppl’ is not derived from ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’
return a , a * a . b < b . a * b . b ;
^
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:404: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(*, __multiplies)
^
/usr/include/c++/7/bits/valarray_after.h:404:5: note: template argument deduction/substitution failed:
Main.cc:14:21: note: ‘ppl’ is not derived from ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’
return a , a * a . b < b . a * b . b ;
^
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:404: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(*, __multiplies)
^
/usr/include/c++/7/bits/valarray_after.h:404:5: note: template argument deduction/substitution failed:
Main.cc:14:21: note: mismatched types ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’ and ‘int’
return a , a * a . b < b . a * b . b ;
^
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:404: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(*, __multiplies)
^
/usr/include/c++/7/bits/valarray_after.h:404:5: note: template argument deduction/substitution failed:
Main.cc:14:21: note: ‘ppl’ is not derived from ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’
return a , a * a . b < b . a * b . b ;
^
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:404: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(*, __multiplies)
^
/usr/include/c++/7/bits/valarray_after.h:404:5: note: template argument deduction/substitution failed:
Main.cc:14:21: note: mismatched types ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’ and ‘int’
return a , a * a . b < b . a * b . b ;
^
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:1174:1: note: candidate: template std::_Expr, typename std::__fun::result_type> std::operator*(const std::valarray<_Tp>&, const std::valarray<_Tp>&)
_DEFINE_BINARY_OPERATOR(*, __multiplies)
^
/usr/include/c++/7/valarray:1174:1: note: template argument deduction/substitution failed:
Main.cc:14:21: note: ‘ppl’ is not derived from ‘const std::valarray<_Tp>’
return a , a * a . b < b . a * b . b ;
^
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:1174:1: note: candidate: template std::_Expr, typename std::__fun::result_type> std::operator*(const std::valarray<_Tp>&, const _Tp&)
_DEFINE_BINARY_OPERATOR(*, __multiplies)
^
/usr/include/c++/7/valarray:1174:1: note: template argument deduction/substitution failed:
Main.cc:14:21: note: ‘ppl’ is not derived from ‘const std::valarray<_Tp>’
return a , a * a . b < b . a * b . b ;
^
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:1174:1: note: candidate: template std::_Expr, typename std::__fun::result_type> std::operator*(const _Tp&, const std::valarray<_Tp>&)
_DEFINE_BINARY_OPERATOR(*, __multiplies)
^
/usr/include/c++/7/valarray:1174:1: note: template argument deduction/substitution failed:
Main.cc:14:21: note: mismatched types ‘const std::valarray<_Tp>’ and ‘int’
return a , a * a . b < b . a * b . b ;
^
Main.cc: In function ‘std::__cxx11::string tstr(int)’:
Main.cc:22:2: error: ‘strint’ was not declared in this scope
strint ans = "" ;
^~~~~~
Main.cc:22:2: note: suggested alternative: ‘stdin’
strint ans = "" ;
^~~~~~
stdin
Main.cc:25:3: error: ‘ans’ was not declared in this scope
ans = num % 10 + '0' + ans ;
^~~
Main.cc:25:3: note: suggested alternative: ‘abs’
ans = num % 10 + '0' + ans ;
^~~
abs
Main.cc:27:9: error: ‘ans’ was not declared in this scope
return ans ;
^~~
Main.cc:27:9: note: suggested alternative: ‘abs’
return ans ;
^~~
abs
Main.cc: In function ‘std::__cxx11::string mul(std::__cxx11::string, std::__cxx11::string)’:
Main.cc:35:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( int i = 0 ; i < a . size ( ) ; i ++ )
~~^~~~~~~~~~~~~~
Main.cc:37:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( int j = 0 ; j < b . size ( ) ; j ++ )
~~^~~~~~~~~~~~~~
Main.cc:42:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( int i = 0 ; i < a . size ( ) + b . size ( ) ; i ++ )
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Main.cc: In function ‘std::__cxx11::string dvd(std::__cxx11::string, int)’:
Main.cc:64:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( int i = 0 ; i < a . size ( ) ; i ++ )
~~^~~~~~~~~~~~~~
Main.cc:66:13: error: invalid types ‘[int]’ for array subscript
div [i + 1] = a [i] - '0' ;
^
Main.cc:68:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( int i = 1 ; i <= a . size ( ) ; i ++ )
~~^~~~~~~~~~~~~~~
Main.cc:70:32: error: invalid types ‘[int]’ for array subscript
rsl [i] = ( rem * 10 + div [i] ) / b ;
^
Main.cc:71:28: error: invalid types ‘[int]’ for array subscript
rem = ( rem * 10 + div [i] ) % b ;
^
Main.cc:73:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while ( ! rsl [len] && len < a . size ( ) )
~~~~^~~~~~~~~~~~~~
Main.cc:77:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( int i = len ; i <= a . size ( ) ; i ++ )
~~^~~~~~~~~~~~~~~
Main.cc:79:14: error: invalid conversion from ‘int*’ to ‘char’ [-fpermissive]
ans += rsl + '0' ;
~~~~^~~~~
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:1176:7: note: initializing argument 1 of ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator+=(_CharT) [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]’
operator+=(_CharT __c)
^~~~~~~~
Main.cc: In function ‘int main()’:
Main.cc:96:36: error: ‘i’ was not declared in this scope
ans = mx ( ans , div ( mul , mn [i] . b ) ) ;
^