Borderou de evaluare (job #2894848)
Utilizator | Data | 28 aprilie 2022 14:39:40 | |
---|---|---|---|
Problema | Flux maxim | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In member function 'modint modint::operator+(modint) const':
main.cpp:10:128: error: call of overloaded 'modint(long long int)' is ambiguous
10 | inline modint operator + (modint other) const { int32_t c = this->value + other.value; return modint(c >= mod ? c - mod : c); }
| ^
main.cpp:9:5: note: candidate: 'modint::modint(int64_t)'
9 | modint(int64_t value_) : value(value_% mod) {}
| ^~~~~~
main.cpp:8:5: note: candidate: 'modint::modint(int32_t)'
8 | modint(int32_t value_) : value(value_% mod) {}
| ^~~~~~
main.cpp:5:8: note: candidate: 'constexpr modint::modint(const modint&)'
5 | struct modint {
| ^~~~~~
main.cpp:5:8: note: candidate: 'constexpr modint::modint(modint&&)'
main.cpp: In member function 'modint modint::operator-(modint) const':
main.cpp:11:125: error: call of overloaded 'modint(long long int)' is ambiguous
11 | inline modint operator - (modint other) const { int32_t c = this->value - other.value; return modint(c < 0 ? c + mod : c); }
| ^
main.cpp:9:5: note: candidate: 'modint::modint(int64_t)'
9 | modint(int64_t value_) : value(value_% mod) {}
| ^~~~~~
main.cpp:8:5: note: candidate: 'modint::modint(int32_t)'
8 | modint(int32_t value_) : value(value_% mod) {}
| ^~~~~~
main.cpp:5:8: note: candidate: 'constexpr modint::modint(const modint&)'
5 | struct modint {
| ^~~~~~
main.cpp:5:8: note: candidate: 'constexpr modint::modint(modint&&)'
main.cpp: In member function 'modint modint::operator*(modint) const':
main.cpp:12:140: error: call of overloaded 'modint(long long int)' is ambiguous
12 | inline modint operator * (modint other) const { int32_t c = (int64_t)this->value * other.value % mod; return modint(c < 0 ? c + mod : c); }
| ^
main.cpp:9:5: note: candidate: 'modint::modint(int64_t)'
9 | modint(int64_t value_) : value(value_% mod) {}
| ^~~~~~
main.cpp:8:5: note: candidate: 'modint::modint(int32_t)'
8 | modint(int32_t value_) : value(value_% mod) {}
| ^~~~~~
main.cpp:5:8: note: candidate: 'constexpr modint::modint(const modint&)'
5 | struct modint {
| ^~~~~~
main.cpp:5:8: note: candidate: 'constexpr modint::modint(modint&&)'
main.cpp: In member function 'modint modint::operator-() const':
main.cpp:16:90: error: call of overloaded 'modint(long long int)' is ambiguous
16 | inline modint operator - () const { return modint(this->value ? mod - this->value : 0); }
| ^
main.cpp:9:5: note: candidate: 'modint::modint(int64_t)'
9 | modint(int64_t value_) : value(value_% mod) {}
| ^~~~~~
main.cpp:8:5: note: candidate: 'modint::modint(int32_t)'
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !