/ Vijos /

记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:23:2: error: 'ans' was not declared in this scope
  ans=0;
  ^~~
foo.cc:23:2: note: suggested alternative: 'abs'
  ans=0;
  ^~~
  abs
foo.cc:30:49: error: no matching function for call to 'min(int)'
        dp[i|(i<<(k-1))][k]==min(dp[i][j]+a[j][k]);
                                                 ^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
                 from /usr/include/c++/7/ios:40,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from foo.cc:1:
/usr/include/c++/7/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
     min(const _Tp& __a, const _Tp& __b)
     ^~~
/usr/include/c++/7/bits/stl_algobase.h:195:5: note:   template argument deduction/substitution failed:
foo.cc:30:49: note:   candidate expects 2 arguments, 1 provided
        dp[i|(i<<(k-1))][k]==min(dp[i][j]+a[j][k]);
                                                 ^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
                 from /usr/include/c++/7/ios:40,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from foo.cc:1:
/usr/include/c++/7/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/usr/include/c++/7/bits/stl_algobase.h:243:5: note:   template argument deduction/substitution failed:
foo.cc:30:49: note:   candidate expects 3 arguments, 1 provided
        dp[i|(i<<(k-1))][k]==min(dp[i][j]+a[j][k]);
                                                 ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1456 最小总代价
语言
C++
递交时间
2021-11-08 19:51:20
评测时间
2021-11-08 19:51:20
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes