/ Vijos /

记录详情

Wrong Answer

foo.cc: In function 'void my_add(std::string, std::string)':
foo.cc:8:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    8 |                 for(int i=0;i<a.length();i++){
      |                             ~^~~~~~~~~~~
foo.cc:17:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |                 for(int i=0;i<a.length();i++){
      |                             ~^~~~~~~~~~~
foo.cc:26:22: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare]
   26 |         for(int i=0;i<=sizeof(c);i++){
      |                     ~^~~~~~~~~~~
foo.cc:27:23: warning: iteration 100 invokes undefined behavior [-Waggressive-loop-optimizations]
   27 |                 if(c[i]>'9')c[i]+='A'-'9'-1;
      |                    ~~~^
foo.cc:26:22: note: within this loop
   26 |         for(int i=0;i<=sizeof(c);i++){
      |                     ~^~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer Read STEP=14, expect STEP=4. 2ms 284.0 KiB
#2 Wrong Answer Read STEP=2, expect STEP=6. 2ms 332.0 KiB
#3 Wrong Answer Read STEP=23, expect STEP=24. 2ms 284.0 KiB
#4 Wrong Answer Read STEP=17, expect Impossible!. 2ms 284.0 KiB

信息

递交者
类型
递交
题目
P1304 回文数
语言
C++
递交时间
2023-05-12 17:16:40
评测时间
2023-05-12 17:16:40
评测机
分数
0
总耗时
10ms
峰值内存
332.0 KiB