Borderou de evaluare (job #701421)

Utilizator avatar haiducii Haiducii haiducii IP ascuns
Problemă Vânător (clasa a 5-a) Compilator cpp-32
Rundă superoji1 Status evaluat
Dată 5 mar. 2023 23:05:04 Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:6:5: error: 'cin' was not declared in this scope 6 | cin >> n >> g; | ^~~ main.cpp:2:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'? 1 | #include <fstream> +++ |+#include <iostream> 2 | using namespace std; main.cpp:7:5: error: 'vector' was not declared in this scope 7 | vector<int> deer(n); | ^~~~~~ main.cpp:2:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? 1 | #include <fstream> +++ |+#include <vector> 2 | using namespace std; main.cpp:7:12: error: expected primary-expression before 'int' 7 | vector<int> deer(n); | ^~~ main.cpp:9:16: error: 'deer' was not declared in this scope 9 | cin >> deer[i]; | ^~~~ main.cpp:11:10: error: 'deer' was not declared in this scope 11 | sort(deer.rbegin(), deer.rend()); | ^~~~ main.cpp:11:5: error: 'sort' was not declared in this scope; did you mean 'short'? 11 | sort(deer.rbegin(), deer.rend()); | ^~~~ | short main.cpp:14:14: error: 'prime' was not declared in this scope 14 | if (!prime(deer[i])) { | ^~~~~ main.cpp:15:13: error: 'max_greutate' was not declared in this scope 15 | max_greutate = deer[i]; | ^~~~~~~~~~~~ main.cpp:19:5: error: 'cout' was not declared in this scope 19 | cout << max_greutate << endl; | ^~~~ main.cpp:19:5: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'? main.cpp:19:13: error: 'max_greutate' was not declared in this scope 19 | cout << max_greutate << endl; | ^~~~~~~~~~~~ main.cpp:12:9: warning: unused variable 'max_weight' [-Wunused-variable] 12 | int max_weight = 0; | ^~~~~~~~~~