Borderou de evaluare (job #2079827)
Utilizator | Data | 1 decembrie 2017 21:18:20 | |
---|---|---|---|
Problema | Peri | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In member function ‘Answer Answer::operator+(const Answer&) const’:
user.cpp:15:56: error: no matching function for call to ‘Answer::Answer(<brace-enclosed initializer list>)’
return Answer{max_different, count + that.count};
^
user.cpp:15:56: note: candidates are:
user.cpp:7:8: note: constexpr Answer::Answer()
struct Answer {
^
user.cpp:7:8: note: candidate expects 0 arguments, 2 provided
user.cpp:7:8: note: constexpr Answer::Answer(const Answer&)
user.cpp:7:8: note: candidate expects 1 argument, 2 provided
user.cpp:7:8: note: constexpr Answer::Answer(Answer&&)
user.cpp:7:8: note: candidate expects 1 argument, 2 provided
user.cpp: In function ‘int main()’:
user.cpp:33:24: error: no matching function for call to ‘Answer::Answer(<brace-enclosed initializer list>)’
Answer answer{-2, 0};
^
user.cpp:33:24: note: candidates are:
user.cpp:7:8: note: constexpr Answer::Answer()
struct Answer {
^
user.cpp:7:8: note: candidate expects 0 arguments, 2 provided
user.cpp:7:8: note: constexpr Answer::Answer(const Answer&)
user.cpp:7:8: note: candidate expects 1 argument, 2 provided
user.cpp:7:8: note: constexpr Answer::Answer(Answer&&)
user.cpp:7:8: note: candidate expects 1 argument, 2 provided
user.cpp:38:32: error: ‘numeric_limits’ was not declared in this scope
Answer best_sum = {numeric_limits<int>::min() / 2, 0};
^
user.cpp:38:47: error: expected primary-expression before ‘int’
Answer best_sum = {numeric_limits<int>::min() / 2, 0};
^
user.cpp:38:47: error: expected ‘}’ before ‘int’
user.cpp:38:47: error: could not convert ‘{<expression error>}’ from ‘<brace-enclosed initializer list>’ to ‘Answer’
user.cpp:38:47: error: expected ‘,’ or ‘;’ before ‘int’
user.cpp:37:17: warning: unused variable ‘horizontal_sum’ [-Wunused-variable]
int horizontal_sum = 0;
^
user.cpp:41:37: error: ‘j’ was not declared in this scope
partial_sum[k] += V[j][k];
^
user.cpp:43:63: error: ‘horizontal_sum’ was not declared in this scope
answer = answer + Answer{partial_sum[k] + horizontal_sum + best_sum.max_different, best_sum.count};
^
user.cpp:43:80: error: ‘best_sum’ was not declared in this scope
answer = answer + Answer{partial_sum[k] + horizontal_sum + best_sum.max_different, best_sum.count};
^
user.cpp:43:118: error: no matching function for call to ‘Answer::Answer(<brace-enclosed initializer list>)’
answer = answer + Answer{partial_sum[k] + horizontal_sum + best_sum.max_different, best_sum.count};
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !