记录详情

Accepted

/in/foo.cc: In member function 'BigInt BigInt::add(BigInt)':
/in/foo.cc:35:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   35 |             if (i < num.size()) sum += num[i];
      |                 ~~^~~~~~~~~~~~
/in/foo.cc:36:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   36 |             if (i < other.num.size()) sum += other.num[i];
      |                 ~~^~~~~~~~~~~~~~~~~~
/in/foo.cc: In member function 'BigInt BigInt::multiply(BigInt)':
/in/foo.cc:49:28: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   49 |         for (auto i = 0; i < num.size(); i ++ ) {
      |                          ~~^~~~~~~~~~~~
/in/foo.cc:51:32: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   51 |             for (auto j = 0; j < other.num.size() || carry; j ++) {
      |                              ~~^~~~~~~~~~~~~~~~~~
/in/foo.cc:52:69: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   52 |                 long long product = result.num[i + j] + num[i] * (j < other.num.size() ? other.num[j] : 0) + carry;
      |                                                                   ~~^~~~~~~~~~~~~~~~~~
# 状态 耗时 内存占用
#1 Accepted 1ms 500.0 KiB
#2 Accepted 2ms 476.0 KiB
#3 Accepted 1ms 472.0 KiB
#4 Accepted 2ms 544.0 KiB
#5 Accepted 1ms 540.0 KiB

信息

递交者
类型
递交
题目
P1024 OO6-2 高精度整数类的加法运算
语言
C++
递交时间
2025-04-18 09:11:55
评测时间
2025-04-18 09:11:55
评测机
分数
100
总耗时
10ms
峰值内存
544.0 KiB