0_0_38074528_32610.cpp: In function 'void solve()': 0_0_38074528_32610.cpp:37:23: error: 'sum' was not declared in this scope double mid = 1.0 * (sum[j] - sum[i-1]) / 2; ^