记录详情

Wrong Answer

foo.cc: In function 'int main()':
foo.cc:12:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   12 |         for (int i = 0; i < s1.size(); i++)
      |                         ~~^~~~~~~~~~~
foo.cc:18:50: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   18 |                         while (s1[j] == s2[k]&& j<s1.size() && k < s2.size())
      |                                                 ~^~~~~~~~~~
foo.cc:18:66: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   18 |                         while (s1[j] == s2[k]&& j<s1.size() && k < s2.size())
      |                                                                ~~^~~~~~~~~~~
foo.cc:23:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   23 |                         if (k == s2.size())
      |                             ~~^~~~~~~~~~~~
foo.cc:10:13: warning: unused variable 's' [-Wunused-variable]
   10 |         int s=0;
      |             ^
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer Standard answer longer than user output. 4ms 412.0 KiB
#2 Accepted 4ms 408.0 KiB
#3 Wrong Answer Read a123abcdefa123, expect a123a123a123. 5ms 412.0 KiB
#4 Wrong Answer Read aaaaa, expect a. 4ms 320.0 KiB
#5 Wrong Answer Standard answer longer than user output. 3ms 412.0 KiB

信息

递交者
类型
递交
题目
P1052 OO11-4 string中的查找替换
比赛
2023春面向对象的程序设计方法(3)
语言
C++
递交时间
2023-06-04 22:09:50
评测时间
2023-06-04 22:09:50
评测机
分数
20
总耗时
22ms
峰值内存
412.0 KiB