Submission #63648


ソースコード

ステータス

項目 データ
問題 1397 - 山本式素因数分解
ユーザー名 syoribu
投稿日時 2020-09-03 22:40:03
言語 C++17
状態 Compile Error
得点 0
ソースコード長 4931 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.cpp:35:26: error: declaration of ‘head&& head’ shadows template parameter
 inline void input(head&& head, tail&&... tail) {
                   ~~~~~~~^~~~
./Main.cpp:34:11: note: template parameter ‘head’ declared here
 template <class head, class... tail>
           ^~~~~
./Main.cpp:35:38: error: declaration of ‘tail&& ... tail’ shadows template parameter
 inline void input(head&& head, tail&&... tail) {
                                ~~~~~~^~~~~~~~
./Main.cpp:34:23: note: template parameter ‘tail’ declared here
 template <class head, class... tail>
                       ^~~~~
./Main.cpp: In function ‘void input(head&&, tail&& ...)’:
./Main.cpp:35:38: error: declaration of ‘tail&& ... tail’ shadows template parameter
 inline void input(head&& head, tail&&... tail) {
                                ~~~~~~^~~~~~~~
./Main.cpp:34:23: note: template parameter ‘tail’ declared here
 template <class head, class... tail>
                       ^~~~~
./Main.cpp:35:26: error: declaration of ‘head&& head’ shadows template parameter
 inline void input(head&& head, tail&&... tail) {
                   ~~~~~~~^~~~
./Main.cpp:34:11: note: template parameter ‘head’ declared here
 template <class head, class... tail>
           ^~~~~
./Main.cpp: At global scope:
./Main.cpp:49:27: error: declaration of ‘head&& head’ shadows template parameter
 inline void output(head&& head, tail&&... tail) {
                    ~~~~~~~^~~~
./Main.cpp:48:11: note: template parameter ‘head’ declared here
 template <class head, class... tail>
           ^~~~~
./Main.cpp:49:39: error: declaration of ‘tail&& ... tail’ shadows template parameter
 inline void output(head&& head, tail&&... tail) {
                                 ~~~~~~^~~~~~~~
./Main.cpp:48:23: note: template parameter ‘tail’ declared here
 template <class head, class... tail>
                       ^~~~~
./Main.cpp: In function ‘void output(head&&, tail&& ...)’:
./Main.cpp:49:39: error: declaration of ‘tail&& ... tail’ shadows template parameter
 inline void output(head&& head, tail&&... tail) {
                                 ~~~~~~^~~~~~~~
./Main.cpp:48:23: note: template parameter ‘tail’ declared here
 template <class head, class... tail>
                       ^~~~~
./Main.cpp:49:27: error: declaration of ‘head&& head’ shadows template parameter
 inline void output(head&& head, tail&&... tail) {
                    ~~~~~~~^~~~
./Main.cpp:48:11: note: template parameter ‘head’ declared here
 template <class head, class... tail>
           ^~~~~
./Main.cpp: At global scope:
./Main.cpp:79:59: error: declaration of ‘args ... args’ shadows template parameter
 inline auto makevector(const t &initvalue, size_t sz, args... args) {
                                                       ~~~~^~~~~~~~
./Main.cpp:78:20: note: template parameter ‘args’ declared here
 template <class t, class... args>
                    ^~~~~
./Main.cpp: In function ‘auto makevector(const t&, size_t, args ...)’:
./Main.cpp:79:59: error: declaration of ‘args ... args’ shadows template parameter
 inline auto makevector(const t &initvalue, size_t sz, args... args) {
                                                       ~~~~^~~~~~~~
./Main.cpp:78:20: note: template parameter ‘args’ declared here
 template <class t, class... args>
                    ^~~~~
./Main.cpp: At global scope:
./Main.cpp:89:47: error: declaration of ‘args&& ... args’ shadows template parameter
     constexpr decltype(auto) operator()(args&&... args) const {
                                         ~~~~~~^~~~~~~~
./Main.cpp:88:15: note: template parameter ‘args’ declared here
     template <class... args>
               ^~~~~
./Main.cpp: In member function ‘constexpr decltype(auto) fixpoint<func>::operator()(args&& ...) const’:
./Main.cpp:89:47: error: declaration of ‘args&& ... args’ shadows template parameter
     constexpr decltype(auto) operator()(args&&... args) const {
                                         ~~~~~~^~~~~~~~
./Main.cpp:88:15: note: template parameter ‘args’ declared here
     template <class... args>
               ^~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/cassert:44,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:33,
                 from ./Main.cpp:4:
./Main.cpp: In function ‘int main()’:
./Main.cpp:139:17: error: ‘N’ was not declared in this scope
     assert(2 <= N && N <= intmax_t(1e6));
                 ^
./Main.cpp: In instantiation of ‘void output(head&&, tail&& ...) [with head = long int&; tail = {long int&}]’:
./Main.cpp:165:49:   required from here
./Main.cpp:52:25: error: no matching function for call to ‘forward<tail#0>(long int&)’
     output(forward<tail>(tail)...);
            ~~~~~~~~~~~~~^~~~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_pair.h:59,
                 from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_algobase.h:64,
                 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:4:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/move.h:74:5: note: candidate: ‘template<class _Tp> constexpr _Tp&& std::forward(typename std::remove_reference<_Tp>::type&)’
     forward(typename std::remove_reference<_Tp>::type& __t) noexcept
     ^~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/move.h:74:5: note:   template argument deduction/substitution failed:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/move.h:85:5: note: candidate: ‘template<class _Tp> constexpr _Tp&& std::forward(typename std::remove_reference<_Tp>::type&&)’
     forward(typename std::remove_reference<_Tp>::type&& __t) noexcept
     ^~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/move.h:85:5: note:   template argument deduction/substitution failed:

セット

セット 得点 Cases

テストケース

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