Borderou de evaluare (job #2293979)
Utilizator | Data | 1 decembrie 2018 19:29:54 | |
---|---|---|---|
Problema | Potrivirea sirurilor | Status | done |
Runda | Arhiva educationala | Compilator | cpp-32 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In member function 'ModPair ModPair::operator/(ModPair) const':
main.cpp:113:54: error: passing 'const ModPair' as 'this' argument discards qualifiers [-fpermissive]
return ModPair(1LL * x * logPower(other.x, mod1 - 2) % mod1, 1LL * y * logPower(other.y, mod2 - 2) % mod2, mod1, mod2); }
^
main.cpp:8:13: note: in call to 'int ModInt::logPower(int, int)'
inline int logPower(int x, int n) {
^~~~~~~~
main.cpp:113:100: error: passing 'const ModPair' as 'this' argument discards qualifiers [-fpermissive]
return ModPair(1LL * x * logPower(other.x, mod1 - 2) % mod1, 1LL * y * logPower(other.y, mod2 - 2) % mod2, mod1, mod2); }
^
main.cpp:8:13: note: in call to 'int ModInt::logPower(int, int)'
inline int logPower(int x, int n) {
^~~~~~~~
main.cpp: In member function 'ModPair ModPair::operator+=(ModPair) const':
main.cpp:116:23: error: assignment of member 'ModPair::x' in read-only object
x = (x + other.x) % mod1; y = (y + other.y) % mod2; return *this; }
^~~~
main.cpp:116:49: error: assignment of member 'ModPair::y' in read-only object
x = (x + other.x) % mod1; y = (y + other.y) % mod2; return *this; }
^~~~
main.cpp: In member function 'ModPair ModPair::operator-=(ModPair) const':
main.cpp:118:30: error: assignment of member 'ModPair::x' in read-only object
x = (x - other.x + mod1) % mod1; y = (y - other.y + mod2) % mod2; return *this; }
^~~~
main.cpp:118:63: error: assignment of member 'ModPair::y' in read-only object
x = (x - other.x + mod1) % mod1; y = (y - other.y + mod2) % mod2; return *this; }
^~~~
main.cpp: In member function 'ModPair ModPair::operator*=(ModPair) const':
main.cpp:120:27: error: assignment of member 'ModPair::x' in read-only object
x = 1LL * x * other.x % mod1; y = 1LL * y * other.y % mod2; return *this; }
^~~~
main.cpp:120:57: error: assignment of member 'ModPair::y' in read-only object
x = 1LL * x * other.x % mod1; y = 1LL * y * other.y % mod2; return *this; }
^~~~
main.cpp: In member function 'ModPair ModPair::operator/=(ModPair) const':
main.cpp:122:43: error: passing 'const ModPair' as 'this' argument discards qualifiers [-fpermissive]
x = 1LL * x + logPower(other.x, mod1 - 2) % mod1; y = 1LL * y * logPower(other.y, mod2 - 2) % mod2; return *this; }
^
main.cpp:8:13: note: in call to 'int ModInt::logPower(int, int)'
inline int logPower(int x, int n) {
^~~~~~~~
main.cpp:122:47: error: assignment of member 'ModPair::x' in read-only object
x = 1LL * x + logPower(other.x, mod1 - 2) % mod1; y = 1LL * y * logPower(other.y, mod2 - 2) % mod2; return *this; }
^~~~
main.cpp:122:93: error: passing 'const ModPair' as 'this' argument discards qualifiers [-fpermissive]
x = 1LL * x + logPower(other.x, mod1 - 2) % mod1; y = 1LL * y * logPower(other.y, mod2 - 2) % mod2; return *this; }
^
main.cpp:8:13: note: in call to 'int ModInt::logPower(int, int)'
inline int logPower(int x, int n) {
^~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !