Borderou de evaluare (job #2797870)

Utilizator chiriacandrei25Chiriac Andrei chiriacandrei25 Data 10 noiembrie 2021 18:17:46
Problema Subsecventa de suma maxima Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'Ssm solve(int*, int, int)': main.cpp:24:28: error: 'INT_MAX' was not declared in this scope 24 | int sum = 0, maxSum = -INT_MAX, bestSt, bestDr; | ^~~~~~~ main.cpp:2:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'? 1 | #include <fstream> +++ |+#include <climits> 2 | main.cpp:29:13: error: 'bestSt' was not declared in this scope 29 | bestSt = st; | ^~~~~~ main.cpp:40:13: error: 'bestDr' was not declared in this scope 40 | bestDr = dr; | ^~~~~~ main.cpp:55:25: error: 'bestSt' was not declared in this scope; did you mean 'bestSum'? 55 | sol = {bestSum, bestSt, bestDr}; | ^~~~~~ | bestSum main.cpp:55:33: error: 'bestDr' was not declared in this scope 55 | sol = {bestSum, bestSt, bestDr}; | ^~~~~~ main.cpp:55:39: error: no match for 'operator=' (operand types are 'Ssm' and '<brace-enclosed initializer list>') 55 | sol = {bestSum, bestSt, bestDr}; | ^ main.cpp:7:8: note: candidate: 'constexpr Ssm& Ssm::operator=(const Ssm&)' 7 | struct Ssm { | ^~~ main.cpp:7:8: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const Ssm&' main.cpp:7:8: note: candidate: 'constexpr Ssm& Ssm::operator=(Ssm&&)' main.cpp:7:8: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'Ssm&&' main.cpp:57:36: error: 'bestSt' was not declared in this scope; did you mean 'bestSum'? 57 | else if(bestSum == sol.sum && (bestSt < sol.left || (bestSt == sol.left && bestDr < sol.right))) { | ^~~~~~ | bestSum main.cpp:57:80: error: 'bestDr' was not declared in this scope 57 | else if(bestSum == sol.sum && (bestSt < sol.left || (bestSt == sol.left && bestDr < sol.right))) { | ^~~~~~ main.cpp:58:39: error: no match for 'operator=' (operand types are 'Ssm' and '<brace-enclosed initializer list>') 58 | sol = {bestSum, bestSt, bestDr}; | ^ main.cpp:7:8: note: candidate: 'constexpr Ssm& Ssm::operator=(const Ssm&)' 7 | struct Ssm { | ^~~ main.cpp:7:8: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const Ssm&' main.cpp:7:8: note: candidate: 'constexpr Ssm& Ssm::operator=(Ssm&&)' main.cpp:7:8: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'Ssm&&' Non zero exit status: 1

Ceva nu functioneaza?