记录详情

Runtime Error

/in/foo.cc: In function 'void AtoB(std::string)':
/in/foo.cc:7:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 |     for (int i = 1; i < s.length(); ++i) {
      |                     ~~^~~~~~~~~~~~
/in/foo.cc:13:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   13 |     while (j < s.length()) {
      |            ~~^~~~~~~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:32:20: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'int' [-Wformat=]
   32 |     int T; scanf("%d", T);
      |                   ~^   ~
      |                    |   |
      |                    |   int
      |                    int*
/in/foo.cc:32:17: warning: 'T' is used uninitialized [-Wuninitialized]
   32 |     int T; scanf("%d", T);
      |            ~~~~~^~~~~~~~~
/in/foo.cc:32:9: note: 'T' was declared here
   32 |     int T; scanf("%d", T);
      |         ^
/in/foo.cc: In function 'void AtoB(std::string)':
/in/foo.cc:13:12: warning: 'j' may be used uninitialized [-Wmaybe-uninitialized]
   13 |     while (j < s.length()) {
      |            ^
/in/foo.cc:6:23: note: 'j' was declared here
    6 |     int a = 0, b = 0, j;
      |                       ^
# 状态 耗时 内存占用
#1 Runtime Error 2ms 532.0 KiB

信息

递交者
类型
自测
题目
P1001 Hello, World!
语言
C++
递交时间
2025-07-14 13:58:26
评测时间
2025-07-14 13:58:26
评测机
分数
0
总耗时
2ms
峰值内存
532.0 KiB