Borderou de evaluare (job #2161525)

Utilizator PetyAlexandru Peticaru Pety Data 11 martie 2018 19:19:46
Problema Div Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:8:45: error: ‘int pow10 [5003]’ redeclared as different kind of symbol int m, r, pref[5002], suff[5002], pow10[5003], sol1, sol2, n; ^ In file included from /usr/include/features.h:367:0, from /usr/include/assert.h:35, from /usr/include/c++/5/cassert:43, from /usr/include/x86_64-linux-gnu/c++/5/32/bits/stdc++.h:33, from user.cpp:1: /usr/include/bits/mathcalls.h:122:1: note: previous declaration ‘double pow10(double)’ __MATHCALL (pow10,, (_Mdouble_ __x)); ^ user.cpp: In function ‘int lipsa(int, int)’: user.cpp:12:40: warning: pointer to a function used in arithmetic [-Wpointer-arith] return (pref[i - 1] * pow10[n - j - 1] + suff[j + 1]) % m; ^ user.cpp:12:40: warning: pointer to a function used in arithmetic [-Wpointer-arith] user.cpp:12:40: error: invalid operands of types ‘int’ and ‘double(double) throw ()’ to binary ‘operator*’ user.cpp: In function ‘int main()’: user.cpp:20:10: warning: pointer to a function used in arithmetic [-Wpointer-arith] pow10[0] = 1; ^ user.cpp:20:12: error: assignment of function ‘double pow10(double)’ pow10[0] = 1; ^ user.cpp:20:12: error: cannot convert ‘int’ to ‘double(double) throw ()’ in assignment user.cpp:22:12: warning: pointer to a function used in arithmetic [-Wpointer-arith] pow10[i] = (int)(pow10[i - 1] * 10) % m; ^ user.cpp:22:33: warning: pointer to a function used in arithmetic [-Wpointer-arith] pow10[i] = (int)(pow10[i - 1] * 10) % m; ^ user.cpp:22:33: warning: pointer to a function used in arithmetic [-Wpointer-arith] user.cpp:22:37: error: invalid operands of types ‘double(double) throw ()’ and ‘int’ to binary ‘operator*’ pow10[i] = (int)(pow10[i - 1] * 10) % m; ^ user.cpp:32:65: warning: pointer to a function used in arithmetic [-Wpointer-arith] suff[i] = (int)(suff[i + 1] + (s[i] - '0') * pow10[n - i - 1]) % m; ^ user.cpp:32:65: warning: pointer to a function used in arithmetic [-Wpointer-arith] user.cpp:32:65: error: invalid operands of types ‘int’ and ‘double(double) throw ()’ to binary ‘operator*’

Ceva nu functioneaza?