/ new_bzoj /

记录详情

Compile Error

/in/foo.cc: In member function 'big_integer big_integer::operator+(const big_integer&) const':
/in/foo.cc:87:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int i = 0, carry = 0; carry != 0 || i < v.size() || i < addend.v.size(); i++)
                                                  ~~^~~~~~~~~~
/in/foo.cc:87:68: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int i = 0, carry = 0; carry != 0 || i < v.size() || i < addend.v.size(); i++)
                                                                  ~~^~~~~~~~~~~~~~~~~
/in/foo.cc:90:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if (i < v.size()) cur += v[i];
                 ~~^~~~~~~~~~
/in/foo.cc:91:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if (i < addend.v.size()) cur += addend.v[i];
                 ~~^~~~~~~~~~~~~~~~~
/in/foo.cc: In member function 'big_integer big_integer::operator-(const big_integer&) const':
/in/foo.cc:114:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int i = 0, carry = 0; carry != 0 || i < v.size(); i++)
                                                  ~~^~~~~~~~~~
/in/foo.cc:117:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if (i < subtrahend.v.size()) cur -= subtrahend.v[i];
                 ~~^~~~~~~~~~~~~~~~~~~~~
/in/foo.cc: In member function 'big_integer big_integer::operator*(const big_integer&) const':
/in/foo.cc:151:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int i = 0; i < v.size(); i++)
                         ~~^~~~~~~~~~
/in/foo.cc:153:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int j = 0; j < multiplier.v.size(); j++)
                             ~~^~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:155:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 if (i + j >= product.v.size()) product.v.resize(i + j + 1, 0);
                     ~~~~~~^~~~~~~~~~~~~~~~~~~
/in/foo.cc:159:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                     if (i + j + 1 >= product.v.size()) product.v.resize(i + j + 1 + 1, 0);
                         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/in/foo.cc: In member function 'big_integer big_integer::operator|(const big_integer&) const':
/in/foo.cc:293:13: warning: unused variable 'tw' [-Wunused-variable]
         int tw = 0;
             ^~
/in/foo.cc: In function 'int main()':
/in/foo.cc:380:7: error: no match for 'operator<<' (operand types are 'std::ostream {aka std::basic_ostream<char>}' and 'big_integer')
  cout << (t1 | t2);
  ~~~~~^~~~~~~~~~~~
In file included from /usr/include/c++/6/iostream:39:0,
                 from /in/foo.cc:3:
/usr/include/c++/6/ostream:108:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type& (*)(std::basic_ostream<_CharT, _Traits>::__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(__ostream_type& (*__pf)(__ostream_type&))
       ^~~~~~~~
/usr/include/c++/6/ostream:108:7: note:   no known conversion for argument 1 from 'big_integer' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&) {aka std::basic_ostream<char>& (*)(std::basic_ostream<char>&)}'
/usr/include/c++/6/ostream:117:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ios_type& (*)(std::basic_ostream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>; std::basic_ostream<_CharT, _Traits>::__ios_type = std::basic_ios<char>]
       operator<<(__ios_type& (*__pf)(__ios_type&))
       ^~~~~~~~
/usr/include/c++/6/ostream:117:7: note:   no known conversion for argument 1 from 'big_integer' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&) {aka std::basic_ios<char>& (*)(std::basic_ios<char>&)}'
/usr/include/c++/6/ostream:127:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(ios_base& (*__pf) (ios_base&))
       ^~~~~~~~
/usr/include/c++/6/ostream:127:7: note:   no known conversion for argument 1 from 'big_integer' to 'std::ios_base& (*)(std::ios_base&)'
/usr/include/c++/6/ostream:166:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(long __n)
       ^~~~~~~~
/usr/include/c++/6/ostream:166:7: note:   no known conversion for argument 1 from 'big_integer' to 'long int'
/usr/include/c++/6/ostream:170:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(unsigned long __n)
       ^~~~~~~~
/usr/include/c++/6/ostream:170:7: note:   no known conversion for argument 1 from 'big_integer' to 'long unsigned int'
/usr/include/c++/6/ostream:174:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(bool __n)
       ^~~~~~~~
/usr/include/c++/6/ostream:174:7: note:   no known conversion for argument 1 from 'big_integer' to 'bool'
In file included from /usr/include/c++/6/ostream:638:0,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:3:
/usr/include/c++/6/bits/ostream.tcc:91:5: note: candidate: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]
     basic_ostream<_CharT, _Traits>::
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/ostream.tcc:91:5: note:   no known conversion for argument 1 from 'big_integer' to 'short int'
In file included from /usr/include/c++/6/iostream:39:0,
                 from /in/foo.cc:3:
/usr/include/c++/6/ostream:181:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(unsigned short __n)
       ^~~~~~~~
/usr/include/c++/6/ostream:181:7: note:   no known conversion for argument 1 from 'big_integer' to 'short unsigned int'
In file included from /usr/include/c++/6/ostream:638:0,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:3:
/usr/include/c++/6/bits/ostream.tcc:105:5: note: candidate: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]
     basic_ostream<_CharT, _Traits>::
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/ostream.tcc:105:5: note:   no known conversion for argument 1 from 'big_integer' to 'int'
In file included from /usr/include/c++/6/iostream:39:0,
                 from /in/foo.cc:3:
/usr/inclu

信息

递交者
类型
自测
题目
高精度开根
语言
C++
递交时间
2018-09-11 14:51:46
评测时间
2018-09-11 14:51:46
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes