/ Vijos /

记录详情

Runtime Error

/in/foo.cc: In function 'std::__cxx11::string getSwapped(std::__cxx11::string)':
/in/foo.cc:6:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0; i < a.size() / 2; ++i){
                 ~~^~~~~~~~~~~~~~
/in/foo.cc:9:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
# 状态 耗时 内存占用
#1 Runtime Error *** Error in `foo': free(): invalid pointer: 0x00007ff8d908d980 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x70bfb)[0x7ff8d84c5bfb] /lib/x86_64-linux-gnu/libc.so.6(+0x76fc6)[0x7ff8d84cbfc6] /lib/x86_64-linux-gnu/libc.so.6(+0x7780e)[0x7ff8d84cc80e] foo(+0xffa)[0x5569701efffa] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7ff8d84752e1] foo(+0x117a)[0x5569701f017a] ======= Memory map: ======== 5569701ef000-5569701f1000 r-xp 00000000 fc:02 1301714 /tmp/jd4.sandbox.bhcm19v3/in/package/foo 5569703f0000-5569703f1000 r--p 00001000 fc:02 1301714 /tmp/jd4.sandbox.bhcm19v3/in/package/foo 5569703f1000-5569703f2000 rw-p 00002000 fc:02 1301714 /tmp/jd4.sandbox.bhcm19v3/in/package/foo 556971057000-556971089000 rw-p 00000000 00:00 0 [heap] 7ff8d4000000-7ff8d4021000 rw-p 00000000 00:00 0 7ff8d4021000-7ff8d8000000 ---p 00000000 00:00 0 7ff8d8455000-7ff8d85ea000 r-xp 00000000 fc:02 651562 /lib/x86_64-linux-gnu/libc-2.24.so 7ff8d85ea000-7ff8d87ea000 ---p 00195000 fc:02 651562 /lib/x86_64-linux-gnu/libc-2.24.so 7ff8d87ea000-7ff8d87ee000 r--p 00195000 fc:02 651562 /lib/x86_64-linux-gnu/libc-2.24.so 7ff8d87ee000-7ff8d87f0000 rw-p 00199000 fc:02 651562 /lib/x86_64-linux-gnu/libc-2.24.so 7ff8d87f0000-7ff8d87f4000 rw-p 00000000 00:00 0 7ff8d87f4000-7ff8d880a000 r-xp 00000000 fc:02 651582 /lib/x86_64-linux-gnu/libgcc_s.so.1 7ff8d880a000-7ff8d8a09000 ---p 00016000 fc:02 651582 /lib/x86_64-linux-gnu/libgcc_s.so.1 7ff8d8a09000-7ff8d8a0a000 r--p 00015000 fc:02 651582 /lib/x86_64-linux-gnu/libgcc_s.so.1 7ff8d8a0a000-7ff8d8a0b000 rw-p 00016000 fc:02 651582 /lib/x86_64-linux-gnu/libgcc_s.so.1 7ff8d8a0b000-7ff8d8b0e000 r-xp 00000000 fc:02 651591 /lib/x86_64-linux-gnu/libm-2.24.so 7ff8d8b0e000-7ff8d8d0d000 ---p 00103000 fc:02 651591 /lib/x86_64-linux-gnu/libm-2.24.so 7ff8d8d0d000-7ff8d8d0e000 r--p 00102000 fc:02 651591 /lib/x86_64-linux-gnu/libm-2.24.so 7ff8d8d0e000-7ff8d8d0f000 rw-p 00103000 fc:02 651591 /lib/x86_64-linux-gnu/libm-2.24.so 7ff8d8d0f000-7ff8d8e81000 r-xp 00000000 fc:02 652347 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 7ff8d8e81000-7ff8d9081000 ---p 00172000 fc:02 652347 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 7ff8d9081000-7ff8d908b000 r--p 00172000 fc:02 652347 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 7ff8d908b000-7ff8d908d000 rw-p 0017c000 fc:02 652347 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 7ff8d908d000-7ff8d9091000 rw-p 00000000 00:00 0 7ff8d9091000-7ff8d90b4000 r-xp 00000000 fc:02 651544 /lib/x86_64-linux-gnu/ld-2.24.so 7ff8d92ad000-7ff8d92b4000 rw-p 00000000 00:00 0 7ff8d92b4000-7ff8d92b5000 r--p 00023000 fc:02 651544 /lib/x86_64-linux-gnu/ld-2.24.so 7ff8d92b5000-7ff8d92b6000 rw-p 00024000 fc:02 651544 /lib/x86_64-linux-gnu/ld-2.24.so 7ff8d92b6000-7ff8d92b7000 rw-p 00000000 00:00 0 7fff5dcb6000-7fff5dcd7000 rw-p 00000000 00:00 0 [stack] 7fff5dd5a000-7fff5dd5d000 r--p 00000000 00:00 0 [vvar] 7fff5dd5d000-7fff5dd5e000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 --xp 00000000 00:00 0 [vsyscall] 2ms 568.0 KiB

信息

递交者
类型
自测
题目
P1449 字符串还原
语言
C++
递交时间
2024-10-08 08:12:21
评测时间
2024-10-08 08:12:21
评测机
分数
0
总耗时
2ms
峰值内存
568.0 KiB