Borderou de evaluare (job #3162782)
Utilizator | Data | 29 octombrie 2023 21:16:30 | |
---|---|---|---|
Problema | Padure | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In member function 'void Graph::printGraph()':
main.cpp:42:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Node>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
42 | for (int i = 0; i < nodes.size(); i++) {
| ~~^~~~~~~~~~~~~~
main.cpp:44:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
44 | for (int j = 0; j < nodes[i].neighbors.size(); j++) {
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp: In member function 'void Graph::addAdjacentEdgesFormGridStructure(std::vector<std::vector<int> >&)':
main.cpp:114:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Node>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
114 | for(int i = 2*n-1; i < nodes.size()-n; i+=n){
| ~~^~~~~~~~~~~~~~~~
main.cpp:125:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Node>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
125 | for (int i = 0; i < nodes.size(); ++i) {
| ~~^~~~~~~~~~~~~~
main.cpp:126:54: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Node>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
126 | if(i%n != 0 && i%n != n-1 && i >= n && i < nodes.size()-n){
| ~~^~~~~~~~~~~~~~~~
main.cpp: In constructor 'Graph::Graph(std::vector<std::vector<int> >&)':
main.cpp:146:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Node>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
146 | for (int i = 0; i < nodes.size(); ++i) {
| ~~^~~~~~~~~~~~~~
main.cpp: In member function 'int Graph::MakeGrafFromGridForest(std::vector<std::vector<int> >&, int, int, int, int)':
main.cpp:184:14: error: 'unordered_map' is not a member of 'std'
184 | std::unordered_map<int, std::vector<int>> graph;
| ^~~~~~~~~~~~~
main.cpp:7:1: note: 'std::unordered_map' is defined in header '<unordered_map>'; did you forget to '#include <unordered_map>'?
6 | #include <valarray>
+++ |+#include <unordered_map>
7 |
main.cpp:184:28: error: expected primary-expression before 'int'
184 | std::unordered_map<int, std::vector<int>> graph;
| ^~~
main.cpp:217:21: error: 'graph' was not declared in this scope; did you mean 'Graph'?
217 | graph[clusterId] = nodes; // Adaugare noduri in graf
| ^~~~~
| Graph
main.cpp:231:34: error: 'graph' was not declared in this scope; did you mean 'Graph'?
231 | for (int node1 : graph[i]) {
| ^~~~~
| Graph
main.cpp:244:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Node>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
244 | for (int i = 0; i < nodes.size(); ++i) {
| ~~^~~~~~~~~~~~~~
main.cpp:252:29: error: 'graph' was not declared in this scope; did you mean 'Graph'?
252 | for (int node : graph[i]) {
| ^~~~~
| Graph
main.cpp:263:29: error: 'graph' was not declared in this scope; did you mean 'Graph'?
263 | for (int node : graph[i]) {
| ^~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !