Borderou de evaluare (job #2161532)
Utilizator | Data | 11 martie 2018 19:22:03 | |
---|---|---|---|
Problema | Div | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:8:47: 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:42: 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:42: warning: pointer to a function used in arithmetic [-Wpointer-arith]
user.cpp:12:42: error: invalid operands of types ‘int’ and ‘double(double) throw ()’ to binary ‘operator*’
user.cpp: In function ‘int main()’:
user.cpp:20:12: warning: pointer to a function used in arithmetic [-Wpointer-arith]
__pow10[0] = 1;
^
user.cpp:20:14: error: assignment of function ‘double __pow10(double)’
__pow10[0] = 1;
^
user.cpp:20:14: error: cannot convert ‘int’ to ‘double(double) throw ()’ in assignment
user.cpp:22:14: warning: pointer to a function used in arithmetic [-Wpointer-arith]
__pow10[i] = (int)(__pow10[i - 1] * 10) % m;
^
user.cpp:22:37: warning: pointer to a function used in arithmetic [-Wpointer-arith]
__pow10[i] = (int)(__pow10[i - 1] * 10) % m;
^
user.cpp:22:37: warning: pointer to a function used in arithmetic [-Wpointer-arith]
user.cpp:22:41: error: invalid operands of types ‘double(double) throw ()’ and ‘int’ to binary ‘operator*’
__pow10[i] = (int)(__pow10[i - 1] * 10) % m;
^
user.cpp:32:67: 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:67: warning: pointer to a function used in arithmetic [-Wpointer-arith]
user.cpp:32:67: error: invalid operands of types ‘int’ and ‘double(double) throw ()’ to binary ‘operator*’
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !