Record Case Detail

Notes

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

Stderr

/in/lab5.c:86:36: runtime error: index -1 out of bounds for type 'double [120]'
=================================================================
==4901==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffe60eb8f28 at pc 0x556e244985de bp 0x7ffe60eb88f0 sp 0x7ffe60eb88e0
READ of size 8 at 0x7ffe60eb8f28 thread T0
    #0 0x556e244985dd in main (/out/package/lab5+0xc5dd)
    #1 0x7f2955693c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
    #2 0x556e24499949 in _start (/out/package/lab5+0xd949)

Address 0x7ffe60eb8f28 is located in stack of thread T0 at offset 1400 in frame
    #0 0x556e244948af in main (/out/package/lab5+0x88af)

  This frame has 12 object(s):
    [32, 36) 'VarNum'
    [96, 100) 'top'
    [160, 164) 'NumRVP'
    [224, 228) 'OutputOrNot'
    [288, 296) 'input'
    [352, 512) 'VarValue'
    [544, 844) 'VarName'
    [896, 1376) 'helper'
    [1408, 2368) 'stack' <== Memory access at offset 1400 underflows this variable
    [2400, 3360) 'RVP'
    [3392, 3512) 'line'
  

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

0.010000
250.000000
250.000000
62253.000000
64.000000
7091.000000
2.550000
-22.350000