Submission #00101


ソースコード

ステータス

項目 データ
問題 0003 - 入場料金
ユーザー名 ei2103
投稿日時 2022-07-04 16:59:15
言語 C++17
状態 Compile Error
得点 0
ソースコード長 619 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.cpp: In function ‘int main()’:
./Main.cpp:15:65: error: no matching function for call to ‘min(double, int)’
             cout<<min((x[i]*b[i]+y[i]*2)*0.8,x[i]*b[i]+y[i]*p[i])<<endl;
                                                                 ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/specfun.h:45,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/cmath:1892,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:41,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algobase.h:195:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)’
     min(const _Tp& __a, const _Tp& __b)
     ^~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algobase.h:195:5: note:   template argument deduction/substitution failed:
./Main.cpp:15:65: note:   deduced conflicting types for parameter ‘const _Tp’ (‘double’ and ‘int’)
             cout<<min((x[i]*b[i]+y[i]*2)*0.8,x[i]*b[i]+y[i]*p[i])<<endl;
                                                                 ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/specfun.h:45,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/cmath:1892,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:41,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algobase.h:243:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)’
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algobase.h:243:5: note:   template argument deduction/substitution failed:
./Main.cpp:15:65: note:   deduced conflicting types for parameter ‘const _Tp’ (‘double’ and ‘int’)
             cout<<min((x[i]*b[i]+y[i]*2)*0.8,x[i]*b[i]+y[i]*p[i])<<endl;
                                                                 ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/algorithm:62,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:65,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algo.h:3450:5: note: candidate: ‘template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)’
     min(initializer_list<_Tp> __l)
     ^~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algo.h:3450:5: note:   template argument deduction/substitution failed:
./Main.cpp:15:65: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘double’
             cout<<min((x[i]*b[i]+y[i]*2)*0.8,x[i]*b[i]+y[i]*p[i])<<endl;
                                                                 ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/algorithm:62,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:65,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algo.h:3456:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)’
     min(initializer_list<_Tp> __l, _Compare __comp)
     ^~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algo.h:3456:5: note:   template argument deduction/substitution failed:
./Main.cpp:15:65: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘double’
             cout<<min((x[i]*b[i]+y[i]*2)*0.8,x[i]*b[i]+y[i]*p[i])<<endl;
                                                                 ^
./Main.cpp:17:39: error: no matching function for call to ‘min(int)’
             cout<<min(x[i]*5+y[i]*p[i])*0.8,x[i]*b[i]+y[i]*p[i])<<endl;
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/specfun.h:45,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/cmath:1892,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:41,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algobase.h:195:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)’
     min(const _Tp& __a, const _Tp& __b)
     ^~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algobase.h:195:5: note:   template argument deduction/substitution failed:
./Main.cpp:17:39: note:   candidate expects 2 arguments, 1 provided
             cout<<min(x[i]*5+y[i]*p[i])*0.8,x[i]*b[i]+y[i]*p[i])<<endl;
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/specfun.h:45,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/cmath:1892,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:41,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algobase.h:243:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)’
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algobase.h:243:5: note:   template argument deduction/substitution failed:
./Main.cpp:17:39: note:   candidate expects 3 arguments, 1 provided
             cout<<min(x[i]*5+y[i]*p[i])*0.8,x[i]*b[i]+y[i]*p[i])<<endl;
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/algorithm:62,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:65,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algo.h:3450:5: note: candidate: ‘template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)’
     min(initializer_list<_Tp> __l)
     ^~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algo.h:3450:5: note:   template argument deduction/substitution failed:
./Main.cpp:17:39: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘int’
             cout<<min(x[i]*5+y[i]*p[i])*0.8,x[i]*b[i]+y[i]*p[i])<<endl;
                                       ^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/algorithm:62,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:65,
                 from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algo.h:3456:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)’
     min(initializer_list<_Tp> __l, _Compare __comp)
     ^~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algo.h:3456:5: note:   template argument deduction/substitution failed:
./Main.cpp:17:39: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘int’
             cout<<min(x[i]*5+y[i]*p[i])*0.8,x[i]*b[i]+y[i]*p[i])<<endl;
                                       ^

セット

セット 得点 Cases

テストケース

ファイル名 状態 実行時間 メモリ使用量 #