I got this error while solving 988B — 28. Is there a problem in my code or there is problem in server?
Diagnostics detected issues [cpp.g++17-drmemory]: Dr,2018-06-01.M Dr. Memory version 1.11.0
Dr,2018-06-01.M Running "program.exe"
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
C:/Programs/mingw-w64-7/lib/gcc/i686-w64-mingw32/7.3.0/include/c++/bits/stl_algo.h:4866:
Error: comparison doesn't meet irreflexive requirements, assert(!(a < a)).
Objects involved in the operation:
instance "functor" @ 0x1059F4F8 { type = bool (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >,
std::__cxx11::basic_string<char, std::char_traits, std::allocator >);
} iterator::value_type "ordered type" { type = std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >; }
Dr,2018-06-01.M Dr,2018-06-01.M Error #1: POSSIBLE LEAK 60 direct bytes 0x112000f8-0x11200134 + 0 indirect bytes
Dr,2018-06-01.M # 0 replace_malloc [d:\drmemory_package\common\alloc_replace.c:2576]
Dr,2018-06-01.M # 1 msvcrt.dll!strcpy_s +0x5e (0x7700f5d3 <msvcrt.dll+0xf5d3>)
Dr,2018-06-01.M # 2 msvcrt.dll!clearerr_s +0x337 (0x77019eed <msvcrt.dll+0x19eed>)
Dr,2018-06-01.M # 3 msvcrt.dll!clearerr_s +0x27e (0x77019e34 <msvcrt.dll+0x19e34>)
Dr,2018-06-01.M # 4 pre_cpp_init Dr,2018-06-01.M # 5 __tmainCRTStartup
Dr,2018-06-01.M # 6 KERNEL32.dll!BaseThreadInitThunk +0x11 (0x7732336a <KERNEL32.dll+0x1336a>)
Dr,2018-06-01.M Dr,2018-06-01.M ERRORS FOUND: Dr,2018-06-01.M 0 unique, 0 total unaddressable access(es)
Dr,2018-06-01.M 0 unique, 0 total uninitialized access(es)
Dr,2018-06-01.M 0 unique, 0 total invalid heap argument(s)
Dr,2018-06-01.M 0 unique, 0 total GDI usage error(s)
Dr,2018-06-01.M 0 unique, 0 total handle leak(s)
Dr,2018-06-01.M 0 unique, 0 total warning(s)
Dr,2018-06-01.M 0 unique, 0 total, 0 byte(s) of leak(s)
Dr,2018-06-01.M 1 unique, 1 total, 60 byte(s) of possible leak(s)
Dr,2018-06-01.M ERRORS IGNORED: Dr,2018-06-01.M 2 potential error(s) (suspected false positives)
Dr,2018-06-01.M (details: K:\invoker-prod\work\codeforces5\57d12cf173a5333995c276ef79f4cc7c\check-
e59b8e0ea77fb85cd37faece5a3d2153\run\DrMemory-program.exe.7060.000\potential_errors.txt)
Dr,2018-06-01.M 11 unique, 110 total, 35540 byte(s) of still-reachable allocation(s)
Dr,2018-06-01.M (re-run with "-show_reachable" for details)
Dr,2018-06-01.M Details: K:\invoker-prod\work\codeforces5\57d12cf173a5333995c276ef79f4cc7c\check-
e59b8e0ea77fb85cd37faece5a3d2153\run\DrMemory-program.exe.7060.000\results.txt
Dr,2018-06-01.M Fetching 1 symbol files...
Dr,2018-06-01.M [1/1] Fetching symbols for C:\Windows\syswow64\msvcrt.dll
Dr,2018-06-01.M Fetched 1 symbol files successfully
Dr,2018-06-01.M WARNING: application exited with abnormal code 0x3
The core of the problem is in this line of the error message:
Specifically, your comparison operator is not a correct "strictly less than" operator: it should return
false
if "similar" objects are passed, which is not true. Your functionsor
is a "less or equal" operator instead. Fix that and the error should be gone.