Record Case Detail

Notes

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

Stderr

ASAN:DEADLYSIGNAL
=================================================================
==116==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x55567347f723 bp 0x7ffccabb03f0 sp 0x7ffccabb0330 T0)
==116==The signal is caused by a READ memory access.
==116==Hint: address points to the zero page.
    #0 0x55567347f722 in print(Dlist<int>&, Dlist<Instr>&, int*, Instr) (/out/package/sam+0x3722)
    #1 0x55567347e4f2 in main (/out/package/sam+0x24f2)
    #2 0x7fee17604b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #3 0x55567347f3a9 in _start (/out/package/sam+0x33a9)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/out/package/sam+0x3722) in print(Dlist<int>&, Dlist<Instr>&, int*, Instr)
==116==ABORTING

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

PUSHI 0

JOJ Answer

PUSHI 0
1 2 3 4 0 
LOAD PUSHI 1 LOAD PUSHI 1 LOAD NOR PUSHI 1 ADD ADD PUSHI 2 STORE NOOP HALT 
999 888 1 2 0 0 0 0 0 0 0 0 0 0 0 1 
LOAD
1 2 3 4 999 
PUSHI 1 LOAD PUSHI 1 LOAD NOR PUSHI 1 ADD ADD PUSHI 2 STORE NOOP HALT 
999 888 1 2 0 0 0 0 0 0 0 0 0 0 0 1 
PUSHI 1
1 2 3 4 999 1 
LOAD PUSHI 1 LOAD NOR PUSHI 1 ADD ADD PUSHI 2 STORE NOOP HALT 
999 888 1 2 0 0 0 0 0 0 0 0 0 0 0 1 
LOAD
1 2 3 4 999 888 
PUSHI 1 LOAD NOR PUSHI 1 ADD ADD PUSHI 2 STORE NOOP HALT 
999 888 1 2 0 0 0 0 0 0 0 0 0 0 0 1 
PUSHI 1
1 2 3 4 999 888 1 
LOAD NOR PUSHI 1 ADD ADD PUSHI 2 STORE NOOP HALT 
999 888 1 2 0 0 0 0 0 0 0 0 0 0 0 1 
LOAD
1 2 3 4 999 888 888 
NOR PUSHI 1 ADD ADD PUSHI 2 STORE NOOP HALT 
999 888 1 2 0 0 0 0 0 0 0 0 0 0 0 1 
NOR
1 2 3 4 999 -889 
PUSHI 1 ADD ADD PUSHI 2 STORE NOOP HALT 
999 888 1 2 0 0 0 0 0 0 0 0 0 0 0 1 
PUSHI 1
1 2 3 4 999 -889 1 
ADD ADD PUSHI 2 STORE NOOP HALT 
999 888 1 2 0 0 0 0 0 0 0 0 0 0 0 1 
ADD
1 2 3 4 999 -888 
ADD PUSHI 2 STORE NOOP HALT 
999 888 1 2 0 0 0 0 0 0 0 0 0 0 0 1 
ADD
1 2 3 4 111 
P