Record Case Detail

Notes

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

Stderr

=================================================================
==24339==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffd5b0b1770 at pc 0x564c9d89a4c3 bp 0x7ffd5b0b0ef0 sp 0x7ffd5b0b0ee0
WRITE of size 4 at 0x7ffd5b0b1770 thread T0
    #0 0x564c9d89a4c2 in main (/out/package/sam_mem+0x54c2)
    #1 0x7ff8ad36db96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #2 0x564c9d89b169 in _start (/out/package/sam_mem+0x6169)

Address 0x7ffd5b0b1770 is located in stack of thread T0 at offset 2000 in frame
    #0 0x564c9d89722f in main (/out/package/sam_mem+0x222f)

  This frame has 23 object(s):
    [32, 33) '<unknown>'
    [96, 100) 'opsize'
    [160, 164) 'instsize'
    [224, 228) 'temp'
    [288, 292) '<unknown>'
    [352, 356) '<unknown>'
    [416, 420) 'temp2'
    [480, 484) 'temp1'
    [544, 576) '__tmp'
    [608, 640) '__tmp'
    [672, 704) '__tmp'
    [736, 768) '__tmp'
    [800, 832) '__tmp'
    [864, 896) '__tmp'
    [928, 960) '__tmp'
    [992, 1024) '__tmp'
    [1056, 113

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

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 LO