/ Vijos /

记录详情

Compile Error

/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);
                    ^~

信息

递交者
类型
递交
题目
P1253 旅行家的预算
语言
C++
递交时间
2023-08-23 15:40:55
评测时间
2023-08-23 15:40:55
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes