/ Vijos /

记录详情

Accepted

/in/foo.cc: In member function 'BigInt BigInt::operator+(const BigInt&) const':
/in/foo.cc:51:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   51 | if (count == 0 && i >= s.size() && i >= b.s.size()) break;
      |                   ~~^~~~~~~~~~~
/in/foo.cc:51:38: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   51 | if (count == 0 && i >= s.size() && i >= b.s.size()) break;
      |                                    ~~^~~~~~~~~~~~~
/in/foo.cc:53:7: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   53 | if (i < s.size()) x += s[i];
      |     ~~^~~~~~~~~~
/in/foo.cc:54:7: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   54 | if (i < b.s.size()) x += b.s[i];
      |     ~~^~~~~~~~~~~~
/in/foo.cc: In member function 'BigInt BigInt::operator*(int) const':
/in/foo.cc:66:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   66 | if (carry == 0 && i >= s.size()) break;
      |                   ~~^~~~~~~~~~~
/in/foo.cc:68:7: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   68 | if (i < s.size()) x += (long long)times * s[i];
      |     ~~^~~~~~~~~~
/in/foo.cc: In function 'std::ostream& operator<<(std::ostream&, const BigInt&)':
/in/foo.cc:82:19: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
   82 | for (int j = 0; j < strlen(buf); j++) out << buf[j];
      |                 ~~^~~~~~~~~~~~~
/in/foo.cc: In function 'bool check(std::string&, std::string&, int, int)':
/in/foo.cc:165:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  165 | for (int i = 0, j = pos + blank;i < a.size() && j < b.size(); i++,j++)
      |                                 ~~^~~~~~~~~~
/in/foo.cc:165:51: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  165 | for (int i = 0, j = pos + blank;i < a.size() && j < b.size(); i++,j++)
      |                                                 ~~^~~~~~~~~~
/in/foo.cc: In function 'bool check_through(std::string, std::string&, int)':
/in/foo.cc:174:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  174 | for (;pos < b.size(); pos += a.size())
      |       ~~~~^~~~~~~~~~
/in/foo.cc: In function 'bool all(std::string&, char)':
/in/foo.cc:184:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  184 | for (int i = 0; i < a.size(); i++)
      |                 ~~^~~~~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:197:28: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  197 | else for (int len = 1; len <= s.size(); len++)
      |                        ~~~~^~~~~~~~~~~
# 状态 耗时 内存占用
#1 Accepted 2ms 320.0 KiB

信息

递交者
类型
自测
题目
P1005 超长数字串
语言
C++
递交时间
2025-03-06 17:05:18
评测时间
2025-03-06 17:05:18
评测机
分数
10
总耗时
2ms
峰值内存
320.0 KiB