Borderou de evaluare (job #1424163)
Utilizator | Data | 23 aprilie 2015 17:34:04 | |
---|---|---|---|
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:32: error: no match for ‘operator*’ (operand types are ‘mat<long unsigned int, 2ul, 2ul> {aka const std::array<std::array<long unsigned int, 2u>, 2u>}’ and ‘mat<long unsigned int, 2ul, 2ul> {aka const std::array<std::array<long unsigned int, 2u>, 2u>}’)
return (x!=0) ? ((x&1) ? exp(e*e, x/2, rez*e) : exp(e*e, x/2, rez)) : rez; }
^
user.cpp:23:32: 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> operator*(mat<T, N, M>&, mat<T, K, N>&)
mat<T, K, M> operator*(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:33: note: mismatched types ‘long unsigned int’ and ‘#‘integer_cst’ not supported by dump_type#<type error>’
return (x!=0) ? ((x&1) ? exp(e*e, x/2, rez*e) : exp(e*e, x/2, rez)) : rez; }
^
user.cpp:23:33: 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:44: error: no match for ‘operator*’ (operand types are ‘mat<long unsigned int, 2ul, 2ul> {aka const std::array<std::array<long unsigned int, 2u>, 2u>}’ and ‘mat<long unsigned int, 2ul, 2ul> {aka const std::array<std::array<long unsigned int, 2u>, 2u>}’)
return (x!=0) ? ((x&1) ? exp(e*e, x/2, rez*e) : exp(e*e, x/2, rez)) : rez; }
^
user.cpp:23:44: 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> operator*(mat<T, N, M>&, mat<T, K, N>&)
mat<T, K, M> operator*(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:45: note: mismatched types ‘long unsigned int’ and ‘#‘integer_cst’ not supported by dump_type#<type error>’
return (x!=0) ? ((x&1) ? exp(e*e, x/2, rez*e) : exp(e*e, x/2, rez)) : rez; }
^
user.cpp:23:45: 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:55: error: no match for ‘operator*’ (operand types are ‘mat<long unsigned int, 2ul, 2ul> {aka const std::array<std::array<long unsigned int, 2u>, 2u>}’ and ‘mat<long unsigned int, 2ul, 2ul> {aka const std::array<std::array<long unsigned int, 2u>, 2u>}’)
return (x!=0) ? ((x&1) ? exp(e*e, x/2, rez*e) : exp(e*e, x/2, rez)) : rez; }
^
user.cpp:23:55: 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> operator*(mat<T, N, M>&, mat<T, K, N>&)
mat<T, K, M> operator*(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:56: note: mismatched types ‘long unsigned int’ and ‘#‘integer_cst’ not supported by dump_type#<type error>’
return (x!=0) ? ((x&1) ? exp(e*e, x/2, rez*e) : exp(e*e, x/2, rez)) : rez; }
^
user.cpp:23:56: 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:77: 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(e*e, x/2, rez*e) : exp(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?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !