Borderou de evaluare (job #2937581)

Utilizator erixEric stoicescu erix Data 10 noiembrie 2022 17:54:32
Problema Difprim Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:34:63: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 34 | if (P[first_elev] < a || P[first_elev + 1] > b || first_elev == P.size() - 1) cout << -1 << '\n'; | ~~~~~~~~~~~^~~~~~~~~~~~~~~ main.cpp:34:80: error: 'cout' was not declared in this scope 34 | if (P[first_elev] < a || P[first_elev + 1] > b || first_elev == P.size() - 1) cout << -1 << '\n'; | ^~~~ main.cpp:5:1: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'? 4 | #include <algorithm> +++ |+#include <iostream> 5 | main.cpp:35:29: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 35 | for (int i = first_elev; i <= P.size() && P[i] <= b; i++) { | ~~^~~~~~~~~~~ Non zero exit status: 1

Ceva nu functioneaza?