Record Case Detail

Notes

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

Stderr

/in/lab5.c:109:57: runtime error: index -1 out of bounds for type 'double [256]'
=================================================================
==4788==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffddf41ee38 at pc 0x5628d749c197 bp 0x7ffddf41dff0 sp 0x7ffddf41dfe0
READ of size 8 at 0x7ffddf41ee38 thread T0
    #0 0x5628d749c196 in main (/out/package/lab5+0xd196)
    #1 0x7f4de33b2c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
    #2 0x5628d749cc99 in _start (/out/package/lab5+0xdc99)

Address 0x7ffddf41ee38 is located in stack of thread T0 at offset 3480 in frame
    #0 0x5628d7497aef in main (/out/package/lab5+0x8aef)

  This frame has 12 object(s):
    [32, 36) 'VarNum'
    [96, 100) 'top'
    [160, 164) 'NumRVP'
    [224, 228) 'OutputOrNot'
    [288, 296) 'input'
    [352, 1376) 'helper'
    [1408, 3456) 'VarValue'
    [3488, 5536) 'stack' <== Memory access at offset 3480 underflows this variable
    [5568, 7616) 'RVP'
    [7648, 73184) 'VarName'
    [73216, 73472) '

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