Borderou de evaluare (job #1424164)

Utilizator tamionvTamio Vesa Nakajima tamionv Data 23 aprilie 2015 17:35:08
Problema Al k-lea termen Fibonacci Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘constexpr mat<long unsigned int, 2ul, 2ul> exp(mat<long unsigned int, 2ul, 2ul>&, int, mat<long unsigned int, 2ul, 2ul>)’: user.cpp:23:39: error: no matching function for call to ‘mult(mat<long unsigned int, 2ul, 2ul>&, mat<long unsigned int, 2ul, 2ul>&)’ return (x!=0) ? ((x&1) ? exp(mult(e,e), x/2, mult(rez,e)) : exp(mult(e,e), x/2, rez)) : rez; } ^ user.cpp:23:39: note: candidate is: user.cpp:12:14: note: template<class T, long unsigned int N, long unsigned int M, long unsigned int K> mat<T, K, M> mult(mat<T, N, M>&, mat<T, K, N>&) mat<T, K, M> mult(const mat<T, N, M>& A, const mat<T, K, N>& B){ ^ user.cpp:12:14: note: template argument deduction/substitution failed: user.cpp:23:39: note: mismatched types ‘long unsigned int’ and ‘#‘integer_cst’ not supported by dump_type#<type error>’ return (x!=0) ? ((x&1) ? exp(mult(e,e), x/2, mult(rez,e)) : exp(mult(e,e), x/2, rez)) : rez; } ^ user.cpp:23:39: note: ‘mat<long unsigned int, 2ul, 2ul> {aka const std::array<std::array<long unsigned int, 2u>, 2u>}’ is not derived from ‘mat<T, N, M>’ user.cpp:23:57: error: no matching function for call to ‘mult(mat<long unsigned int, 2ul, 2ul>&, mat<long unsigned int, 2ul, 2ul>&)’ return (x!=0) ? ((x&1) ? exp(mult(e,e), x/2, mult(rez,e)) : exp(mult(e,e), x/2, rez)) : rez; } ^ user.cpp:23:57: note: candidate is: user.cpp:12:14: note: template<class T, long unsigned int N, long unsigned int M, long unsigned int K> mat<T, K, M> mult(mat<T, N, M>&, mat<T, K, N>&) mat<T, K, M> mult(const mat<T, N, M>& A, const mat<T, K, N>& B){ ^ user.cpp:12:14: note: template argument deduction/substitution failed: user.cpp:23:57: note: mismatched types ‘long unsigned int’ and ‘#‘integer_cst’ not supported by dump_type#<type error>’ return (x!=0) ? ((x&1) ? exp(mult(e,e), x/2, mult(rez,e)) : exp(mult(e,e), x/2, rez)) : rez; } ^ user.cpp:23:57: note: ‘mat<long unsigned int, 2ul, 2ul> {aka const std::array<std::array<long unsigned int, 2u>, 2u>}’ is not derived from ‘mat<T, N, M>’ user.cpp:23:74: error: no matching function for call to ‘mult(mat<long unsigned int, 2ul, 2ul>&, mat<long unsigned int, 2ul, 2ul>&)’ return (x!=0) ? ((x&1) ? exp(mult(e,e), x/2, mult(rez,e)) : exp(mult(e,e), x/2, rez)) : rez; } ^ user.cpp:23:74: note: candidate is: user.cpp:12:14: note: template<class T, long unsigned int N, long unsigned int M, long unsigned int K> mat<T, K, M> mult(mat<T, N, M>&, mat<T, K, N>&) mat<T, K, M> mult(const mat<T, N, M>& A, const mat<T, K, N>& B){ ^ user.cpp:12:14: note: template argument deduction/substitution failed: user.cpp:23:74: note: mismatched types ‘long unsigned int’ and ‘#‘integer_cst’ not supported by dump_type#<type error>’ return (x!=0) ? ((x&1) ? exp(mult(e,e), x/2, mult(rez,e)) : exp(mult(e,e), x/2, rez)) : rez; } ^ user.cpp:23:74: note: ‘mat<long unsigned int, 2ul, 2ul> {aka const std::array<std::array<long unsigned int, 2u>, 2u>}’ is not derived from ‘mat<T, N, M>’ user.cpp:23:95: error: body of constexpr function ‘constexpr mat<long unsigned int, 2ul, 2ul> exp(mat<long unsigned int, 2ul, 2ul>&, int, mat<long unsigned int, 2ul, 2ul>)’ not a return-statement return (x!=0) ? ((x&1) ? exp(mult(e,e), x/2, mult(rez,e)) : exp(mult(e,e), x/2, rez)) : rez; } ^ user.cpp: In function ‘int kfib(int)’: user.cpp:26:52: error: array must be initialized with a brace-enclosed initializer return exp(mat<unsigned long, 2, 2>{1, 1, 1, 0}, k)[0][1]; } ^ user.cpp:26:52: error: too many initializers for ‘mat<long unsigned int, 2ul, 2ul> {aka std::array<std::array<long unsigned int, 2u>, 2u>}’

Ceva nu functioneaza?