/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:117:29: error: no matching function for call to 'find(int, double)'
     printf("%d", find(0, 1e9));
                             ^
In file included from /usr/include/c++/6/algorithm:62:0,
                 from /in/foo.cc:4:
/usr/include/c++/6/bits/stl_algo.h:3784:5: note: candidate: template<class _IIter, class _Tp> _IIter std::find(_IIter, _IIter, const _Tp&)
     find(_InputIterator __first, _InputIterator __last,
     ^~~~
/usr/include/c++/6/bits/stl_algo.h:3784:5: note:   template argument deduction/substitution failed:
/in/foo.cc:117:29: note:   deduced conflicting types for parameter '_IIter' ('int' and 'double')
     printf("%d", find(0, 1e9));
                             ^
/in/foo.cc:111:12: warning: unused variable 'a' [-Wunused-variable]
     int n, a, b, w;
            ^
/in/foo.cc:111:15: warning: unused variable 'b' [-Wunused-variable]
     int n, a, b, w;
               ^
/in/foo.cc:111:18: warning: unused variable 'w' [-Wunused-variable]
     int n, a, b, w;
                  ^

信息

递交者
类型
递交
题目
P1983 运输计划
语言
C++
递交时间
2017-11-04 17:23:00
评测时间
2017-11-04 17:23:00
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes