0_0_33331372_29831.cpp: In function 'int main()': 0_0_33331372_29831.cpp:80:37: error: 'update' was not declared in this scope update(1,S.n,i,f[i]-1ll*costA*i,1); ^