Notes
This function is in beta test. Please help improve it in the issues
here.
/in/ex1.cpp:25:46: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'unsigned int' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /in/ex1.cpp:25:46 in /in/ex1.cpp:26:17: runtime error: index 4294967295 out of bounds for type 'std::__cxx11::string [10000]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /in/ex1.cpp:26:17 in AddressSanitizer:DEADLYSIGNAL ================================================================= ==61643==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fe8e88b34b0 bp 0x7ffdc56d5230 sp 0x7ffdc5686e98 T0) ==61643==The signal is caused by a READ memory access. ==61643==Hint: address points to the zero page. #0 0x7fe8e88b34af (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x1274af) #1 0x51b268 (/out/package/ex1+0x51b268) #2 0x51a9b9 (/out/package/ex1+0x51a9b9) #3 0x7fe8e7b79b96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #4 0x41e0e9 (/out/package/ex1+0x41e0e9) AddressSanitizer can not provide additional
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
jr luther martin king in published jr king luther martin brotherhood and peace of cause the for yours beauty scintillating their all with nation great our over shine will brotherhood and love of stars radiant the tomorrow distant too not some in and communities drenched fear our from lifted be will misunderstanding of fog deep the and away pass soon will prejudice racial of clouds dark the that hope all us let brother christian a and clergyman fellow a as but leader civil-rights a or integrationist an as not you of each meet to me for possible it make soon will circumstances that hope also i faith the in strong you finds letter this hope i independence of declaration the and constitution the of formulation their in fathers founding the by deep dug were which democracy of wells great those to back nation our bringing thereby heritage christian judaeo our in values sacred most the for and dream american the in best is what for up standing reality in were they counters lunch at down sat god of children disinheri
JOJ Answer
jr luther martin king in published jr king luther martin brotherhood and peace of cause the for yours beauty scintillating their all with nation great our over shine will brotherhood and love of stars radiant the tomorrow distant too not some in and communities drenched fear our from lifted be will misunderstanding of fog deep the and away pass soon will prejudice racial of clouds dark the that hope all us let brother christian a and clergyman fellow a as but leader civil-rights a or integrationist an as not you of each meet to me for possible it make soon will circumstances that hope also i faith the in strong you finds letter this hope i independence of declaration the and constitution the of formulation their in fathers founding the by deep dug were which democracy of wells great those to back nation our bringing thereby heritage christian judaeo our in values sacred most the for and dream american the in best is what for up standing reality in were they counters lunch at down sat god of children disinheri