Record Case Detail

Notes

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

Stderr

/in/lab5.c:178:29: runtime error: index -2 out of bounds for type 'double [120]'
=================================================================
==5052==ERROR: AddressSanitizer: global-buffer-overflow on address 0x561f08c38790 at pc 0x561f08a2e777 bp 0x7fff447f5870 sp 0x7fff447f5860
READ of size 8 at 0x561f08c38790 thread T0
    #0 0x561f08a2e776 in in2po (/out/package/lab5+0x8776)
    #1 0x561f08a2bf1e in main (/out/package/lab5+0x5f1e)
    #2 0x7fb175f93c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
    #3 0x561f08a2c089 in _start (/out/package/lab5+0x6089)

0x561f08c38790 is located 16 bytes to the left of global variable 'stack' defined in '/in/lab5.c:6:8' (0x561f08c387a0) of size 960
0x561f08c38790 is located 44 bytes to the right of global variable 'top' defined in '/in/lab5.c:7:5' (0x561f08c38760) of size 4
SUMMARY: AddressSanitizer: global-buffer-overflow (/out/package/lab5+0x8776) in in2po
Shadow bytes around the buggy address:
  0x0ac46117f0a0: 00 00 00 00 00 00 00 00 00 00 00 

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

2.000000
0.000250
-0.250000
0.888889
-3.777800
777.375000
64.000000
4.160000
2.550000
128.000000