/ Vijos /

记录详情

Accepted

foo.cc: In lambda function:
foo.cc:31:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<double, double> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   31 |         if (id == v.size() - 1) {
      |             ~~~^~~~~~~~~~~~~~~
foo.cc:32:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<double>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   32 |             for (int i = 0; i < now.size(); i++) { //到终点反悔掉剩下的油
      |                             ~~^~~~~~~~~~~~
foo.cc:33:24: warning: unused variable 'dd' [-Wunused-variable]
   33 |                 double dd = v[i].first,pp = v[i].second;
      |                        ^~
foo.cc:40:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<double>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   40 |         for (int i = 0; i < now.size(); i++) { // 反悔贪心
      |                         ~~^~~~~~~~~~~~
foo.cc:41:20: warning: unused variable 'dd' [-Wunused-variable]
   41 |             double dd = v[i].first,pp = v[i].second;
      |                    ^~
foo.cc:57:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   57 |         for (int i=0; i<pos.size(); i++) { // 贪心选最便宜的油
      |                       ~^~~~~~~~~~~
foo.cc:39:16: warning: unused variable 'di' [-Wunused-variable]
   39 |         double di = v[id].first,pi = v[id].second;
      |                ^~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 4ms 408.0 KiB
#2 Accepted 4ms 412.0 KiB
#3 Accepted 4ms 412.0 KiB
#4 Accepted 3ms 412.0 KiB
#5 Accepted 3ms 412.0 KiB

信息

递交者
类型
递交
题目
P1253 旅行家的预算
语言
C++
递交时间
2023-08-23 15:51:37
评测时间
2023-08-23 15:51:37
评测机
分数
100
总耗时
20ms
峰值内存
412.0 KiB