Borderou de evaluare (job #3368227)

Utilizator Emre12Isleam Emre Emre12 Data 13 octombrie 2026 17:54:55
Problema Expresie2 Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:10:15: error: 'vector' is not a member of 'std' 10 | int sMax(std::vector<int> v, int n) { // kadane | ^~~~~~ main.cpp:3:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? 2 | #include <fstream> +++ |+#include <vector> 3 | main.cpp:10:22: error: expected primary-expression before 'int' 10 | int sMax(std::vector<int> v, int n) { // kadane | ^~~ main.cpp:10:30: error: expected primary-expression before 'int' 10 | int sMax(std::vector<int> v, int n) { // kadane | ^~~ main.cpp:10:35: error: expression list treated as compound expression in initializer [-fpermissive] 10 | int sMax(std::vector<int> v, int n) { // kadane | ^ main.cpp:20:36: error: 'std::vector' has not been declared 20 | int qselect(int st, int dr, int n, std::vector<int> v) { // quickselect hoare | ^~~ main.cpp:20:47: error: expected ',' or '...' before '<' token 20 | int qselect(int st, int dr, int n, std::vector<int> v) { // quickselect hoare | ^ main.cpp: In function 'int qselect(int, int, int, int)': main.cpp:21:13: error: 'v' was not declared in this scope 21 | int piv = v[(st + dr) / 2], b = st, e = dr; | ^ main.cpp:22:12: error: 'b' was not declared in this scope 22 | while (v[b] < piv) | ^ main.cpp:25:6: error: no 'operator--(int)' declared for postfix '--' [-fpermissive] 25 | e--; | ~^~ main.cpp:27:10: error: 'b' was not declared in this scope 27 | while (b < e) { | ^ main.cpp:33:8: error: no 'operator--(int)' declared for postfix '--' [-fpermissive] 33 | e--; | ~^~ main.cpp:37:6: error: no 'operator++(int)' declared for postfix '++' [-fpermissive] 37 | e++; | ~^~ main.cpp:38:9: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 38 | if (e == n) | ~ ^~ ~ | | | | | int | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/c++allocator.h:33, from /usr/include/c++/12.2.1/bits/allocator.h:46, from /usr/include/c++/12.2.1/string:41, Non zero exit status: 1

Ceva nu functioneaza?