Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr

=================================================================
==97989==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x613000000190 at pc 0x5602c50e91d8 bp 0x7fff2baa62c0 sp 0x7fff2baa62b0
READ of size 8 at 0x613000000190 thread T0
    #0 0x5602c50e91d7 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::length() const /usr/include/c++/7/bits/basic_string.h:927
    #1 0x5602c50eb9bb in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /usr/include/c++/7/bits/basic_string.tcc:259
    #2 0x5602c50eb217 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /usr/include/c++/7/bits/basic_string.h:1356
    #3 0x5602c50e9d45 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std

Hints

Your answer may be identical to the JOJ answer in the first several lines.

However, the main problem you meet now is Runtime Error. And the exit code of your program is 1, which should be 0.

Please double check your code to solve this problem and try again.

Your Answer


        

JOJ Answer

PASSED