/in/foo.cc: In lambda function:
/in/foo.cc:31:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (id == v.size() - 1) {
~~~^~~~~~~~~~~~~~~
/in/foo.cc:32:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < now.size(); i++) { //到终点反悔掉剩下的油
~~^~~~~~~~~~~~
/in/foo.cc:33:22: error: expected unqualified-id before '[' token
auto [dd, pp] = v[i];
^
/in/foo.cc:35:26: error: 'pp' was not declared in this scope
sum -= w*pp;
^~
/in/foo.cc:39:14: error: expected unqualified-id before '[' token
auto [di, pi] = v[id];
^
/in/foo.cc:40:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < now.size(); i++) { // 反悔贪心
~~^~~~~~~~~~~~
/in/foo.cc:41:18: error: expected unqualified-id before '[' token
auto [dd, pp] = v[i];
^
/in/foo.cc:43:17: error: 'pp' was not declared in this scope
if (pp > pi) { // 之前买了贵的油 ,现在反悔换成当前的油
^~
/in/foo.cc:43:22: error: 'pi' was not declared in this scope
if (pp > pi) { // 之前买了贵的油 ,现在反悔换成当前的油
^~
/in/foo.cc:51:20: error: 'pi' was not declared in this scope
sum += pi * (c - y);
^~