Notes
This function is in beta test. Please help improve it in the issues
here.
================================================================= ==24450==ERROR: LeakSanitizer: detected memory leaks Direct leak of 8 byte(s) in 2 object(s) allocated from: #0 0x7fe93f691448 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0448) #1 0x55aec1c11f19 in operate(Instr*, Stack<int>&, Queue<Instr>&, int*) (/out/package/sam_mem+0x3f19) Direct leak of 8 byte(s) in 2 object(s) allocated from: #0 0x7fe93f691448 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0448) #1 0x55aec1c11d29 in operate(Instr*, Stack<int>&, Queue<Instr>&, int*) (/out/package/sam_mem+0x3d29) #2 0x6030000037bf (<unknown module>) Direct leak of 4 byte(s) in 1 object(s) allocated from: #0 0x7fe93f691448 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0448) #1 0x55aec1c11d29 in operate(Instr*, Stack<int>&, Queue<Instr>&, int*) (/out/package/sam_mem+0x3d29) #2 0x60300000039f (<unknown module>) Direct leak of 4 byte(s) in
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
POP 68303003 10504706 31500431 92014888 26857265 36590364 21887082 5003718 70989741 40740462 44173995 29434395 60050901 99289747 44851789 38571783 935946 80270648 48307451 2296027 70438236 85857594 48774507 93702914 68009406 12959254 NOOP ADD POP PUSHI 5 LOAD POP ADD POP ADD PUSHI 514403241 NOOP NOR NOOP PUSHI 1203030042 PUSHI 12 LOAD IFZ 19 NOR PUSHI 1143530261 PUSHI 15 STORE PUSHI 15 LOAD IFZ 12 PUSHI 7 STORE PUSHI 0 IFZ 18 ADD HALT POP IFZ 5 NOR POP LOAD STORE LOAD POP HALT STORE POP ADD NOOP IFZ 29 ADD NOOP NOR NOR IFZ 13 POP PUSHI 1283812859 PUSHI 432295147 IFZ 17 PUSHI 433825714 PUSHI 8 STORE PUSHI 11 LOAD NOR PUSHI 6 LOAD PUSHI 1 STORE NOOP POP PUSHI 15 STORE PUSHI 9 STORE ADD NOR NOR NOR NOR NOOP NOOP PUSHI 484356928 NOR POP PUSHI 3 LOAD NOR PUSHI 0 STORE POP PUSHI 6 STORE POP PUSHI 305884821 PUSHI 5 LOAD NOOP POP PUSHI 6 STORE POP NOR PUSHI 11 STORE NOOP PUSHI 555982179 NOOP PUSHI 1356401537 PUSHI 513375311 PUSHI 0 IFZ 1 PUSHI 244360028 PUSHI 9 STORE NOR IFZ 19 PUSHI 1 LOAD PUSHI 14 LOAD IFZ 15 PUSH
JOJ Answer
POP 68303003 10504706 31500431 92014888 26857265 36590364 21887082 5003718 70989741 40740462 44173995 29434395 60050901 99289747 44851789 38571783 935946 80270648 48307451 2296027 70438236 85857594 48774507 93702914 68009406 12959254 NOOP ADD POP PUSHI 5 LOAD POP ADD POP ADD PUSHI 514403241 NOOP NOR NOOP PUSHI 1203030042 PUSHI 12 LOAD IFZ 19 NOR PUSHI 1143530261 PUSHI 15 STORE PUSHI 15 LOAD IFZ 12 PUSHI 7 STORE PUSHI 0 IFZ 18 ADD HALT POP IFZ 5 NOR POP LOAD STORE LOAD POP HALT STORE POP ADD NOOP IFZ 29 ADD NOOP NOR NOR IFZ 13 POP PUSHI 1283812859 PUSHI 432295147 IFZ 17 PUSHI 433825714 PUSHI 8 STORE PUSHI 11 LOAD NOR PUSHI 6 LOAD PUSHI 1 STORE NOOP POP PUSHI 15 STORE PUSHI 9 STORE ADD NOR NOR NOR NOR NOOP NOOP PUSHI 484356928 NOR POP PUSHI 3 LOAD NOR PUSHI 0 STORE POP PUSHI 6 STORE POP PUSHI 305884821 PUSHI 5 LOAD NOOP POP PUSHI 6 STORE POP NOR PUSHI 11 STORE NOOP PUSHI 555982179 NOOP PUSHI 1356401537 PUSHI 513375311 PUSHI 0 IFZ 1 PUSHI 244360028 PUSHI 9 STORE NOR IFZ 19 PUSHI 1 LOAD PUSHI 14 LOAD IFZ 15 PUSH