Notes
This function is in beta test. Please help improve it in the issues
here.
================================================================= ==24295==ERROR: LeakSanitizer: detected memory leaks Direct leak of 184 byte(s) in 23 object(s) allocated from: #0 0x7f009baba448 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0448) #1 0x55fa335a053d in initialize(Dlist<int>&, Dlist<Instr>&, int*) (/out/package/sam_mem+0x453d) #2 0x55fa335a1878 (/out/package/sam_mem+0x5878) Direct leak of 8 byte(s) in 2 object(s) allocated from: #0 0x7f009baba448 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0448) #1 0x55fa3359f7ad in execute(Dlist<int>&, Dlist<Instr>&, int*, bool) (/out/package/sam_mem+0x37ad) #2 0x55fa335a142f (/out/package/sam_mem+0x542f) Direct leak of 8 byte(s) in 2 object(s) allocated from: #0 0x7f009baba448 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0448) #1 0x55fa335a04bd in initialize(Dlist<int>&, Dlist<Instr>&, int*) (/out/package/sam_mem+0x44bd) #2 0x55fa33
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 98789890 60443689 PUSHI 13 STORE POP NOOP PUSHI 1870206906 NOOP NOOP NOOP PUSHI 0 IFZ 21 IFZ 20 ADD POP POP HALT LOAD NOOP STORE STORE ADD STORE ADD ADD HALT STORE HALT STORE POP NOOP ADD IFZ 24 PUSHI 559789598 PUSHI 3 LOAD NOOP NOOP PUSHI 2 STORE POP PUSHI 0 IFZ 2 ADD NOOP POP PUSHI 690254417 PUSHI 14 STORE NOOP PUSHI 5 LOAD HALT 26346560 23782814 71448369 47455713 77024594 88410581 2279202 63785819 85881845 84627026 91276717 80875847 46437728 10120281 60792689 86250600 PUSHI 13 98789890 60443689 13 STORE POP NOOP PUSHI 1870206906 NOOP NOOP NOOP PUSHI 0 IFZ 21 IFZ 20 ADD POP POP HALT LOAD NOOP STORE STORE ADD STORE ADD ADD HALT STORE HALT STORE POP NOOP ADD IFZ 24 PUSHI 559789598 PUSHI 3 LOAD NOOP NOOP PUSHI 2 STORE POP PUSHI 0 IFZ 2 ADD NOOP POP PUSHI 690254417 PUSHI 14 STORE NOOP PUSHI 5 LOAD HALT 26346560 23782814 71448369 47455713 77024594 88410581 2279202 63785819 85881845 84627026 91276717 80875847 46437728 10120281 60792689 86250600 STORE 98789890 POP NOOP PUSHI 1870206906 NOOP NOOP NOOP PU
JOJ Answer
POP 98789890 60443689 PUSHI 13 STORE POP NOOP PUSHI 1870206906 NOOP NOOP NOOP PUSHI 0 IFZ 21 IFZ 20 ADD POP POP HALT LOAD NOOP STORE STORE ADD STORE ADD ADD HALT STORE HALT STORE POP NOOP ADD IFZ 24 PUSHI 559789598 PUSHI 3 LOAD NOOP NOOP PUSHI 2 STORE POP PUSHI 0 IFZ 2 ADD NOOP POP PUSHI 690254417 PUSHI 14 STORE NOOP PUSHI 5 LOAD HALT 26346560 23782814 71448369 47455713 77024594 88410581 2279202 63785819 85881845 84627026 91276717 80875847 46437728 10120281 60792689 86250600 PUSHI 13 98789890 60443689 13 STORE POP NOOP PUSHI 1870206906 NOOP NOOP NOOP PUSHI 0 IFZ 21 IFZ 20 ADD POP POP HALT LOAD NOOP STORE STORE ADD STORE ADD ADD HALT STORE HALT STORE POP NOOP ADD IFZ 24 PUSHI 559789598 PUSHI 3 LOAD NOOP NOOP PUSHI 2 STORE POP PUSHI 0 IFZ 2 ADD NOOP POP PUSHI 690254417 PUSHI 14 STORE NOOP PUSHI 5 LOAD HALT 26346560 23782814 71448369 47455713 77024594 88410581 2279202 63785819 85881845 84627026 91276717 80875847 46437728 10120281 60792689 86250600 STORE 98789890 POP NOOP PUSHI 1870206906 NOOP NOOP NOOP PU