Record Case Detail

Notes

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

Stderr

=================================================================
==22927==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffd570269b0 at pc 0x5596b2171852 bp 0x7ffd57025300 sp 0x7ffd570252f0
READ of size 8 at 0x7ffd570269b0 thread T0
    #0 0x5596b2171851 in taking_command(Stack<int>&, Queue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, int*, bool) (/out/package/sam_mem+0x8851)
    #1 0x5596b216bfa4 in main (/out/package/sam_mem+0x2fa4)
    #2 0x7f8bf574eb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #3 0x5596b216cad9 in _start (/out/package/sam_mem+0x3ad9)

Address 0x7ffd570269b0 is located in stack of thread T0 at offset 5600 in frame
    #0 0x5596b216d31f in taking_command(Stack<int>&, Queue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, int*, bool) (/out/package/sam_mem+0x431f)

  This frame has 26 object(s):
    [32, 33) '<unknown>'
    [96, 97) '<unknown>'
    [160, 161) '<unknown>'
    [224,

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

IFZ 5

JOJ Answer

IFZ 5
61411023 70348979 88725162 89462180 17324650 9392835 64926238 77267699 33787958 44743308 57685737 31784728 2968722 23906346 14847625 72406332 20394993 42116781 14300003 92169720 26229612 12820143 73453370 46939803 73851810 13629166 
NOR POP IFZ 11 PUSHI 4 LOAD PUSHI 0 LOAD ADD PUSHI 2 STORE PUSHI 1924076003 NOR PUSHI 6 LOAD PUSHI 1 LOAD ADD NOR PUSHI 0 STORE PUSHI 793361138 POP IFZ 26 POP NOR NOOP PUSHI 13 LOAD POP NOR PUSHI 5 STORE NOR PUSHI 9 LOAD IFZ 29 PUSHI 8 STORE PUSHI 989917715 PUSHI 1 STORE PUSHI 9 STORE ADD ADD PUSHI 0 IFZ 20 LOAD LOAD IFZ 25 LOAD STORE IFZ 1 HALT NOOP POP IFZ 3 PUSHI 1274522542 NOR HALT NOOP LOAD IFZ 18 HALT LOAD STORE IFZ 4 NOR PUSHI 14 STORE PUSHI 12 LOAD IFZ 1 ADD POP PUSHI 4 LOAD NOR NOOP NOR PUSHI 9 LOAD PUSHI 1260075491 NOR IFZ 24 NOR PUSHI 1955135951 IFZ 8 NOOP ADD PUSHI 15 LOAD PUSHI 15 STORE PUSHI 0 IFZ 7 LOAD POP NOOP NOR PUSHI 605974955 NOR POP NOOP NOR PUSHI 7 LOAD IFZ 26 IFZ 20 POP PUSHI 5 STORE PUSHI 6 LOAD POP PUSHI 1 STORE PUSHI 1707608240 NOOP POP PUSHI 14