ricehub.cpp: In lambda function:
ricehub.cpp:15:29: error: expected '{' before ';' token
spent+= X[r]-[m];
^
ricehub.cpp: In function 'int besthub(int, int, int*, long long int)':
ricehub.cpp:15:29: warning: lambda expressions only available with -std=c++11 or -std=gnu++11
ricehub.cpp:15:25: error: no match for 'operator-' (operand types are 'int' and 'besthub(int, int, int*, long long int)::<lambda()>')
spent+= X[r]-[m];
^
ricehub.cpp:17:57: error: 'max' was not declared in this scope
optimalGain = max(optimalGain, localGain);
^