Borderou de evaluare (job #3136255)
Utilizator | Data | 5 iunie 2023 18:57:10 | |
---|---|---|---|
Problema | Algoritmul Bellman-Ford | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In lambda function:
main.cpp:70:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
70 | for(int i = 0; i <= coded.size(); i++){
| ~~^~~~~~~~~~~~~~~
main.cpp:71:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
71 | for(j = 0; j < coded.size(); j++){
| ~~^~~~~~~~~~~~~~
main.cpp:75:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
75 | if(j == coded.size())
| ~~^~~~~~~~~~~~~~~
main.cpp: In function 'std::vector<int> pruferDecode(std::vector<int>, bool)':
main.cpp:83:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
83 | for(int i = 0; i < coded.size();i++){
| ~~^~~~~~~~~~~~~~
main.cpp: In function 'void extracthuf(node*, std::string)':
main.cpp:109:14: warning: unused variable 'c' [-Wunused-variable]
109 | char c = *((char *) root->el[0]);
| ^
main.cpp: In function 'void encodeHuf(std::string)':
main.cpp:172:11: warning: unused variable 'n4' [-Wunused-variable]
172 | node* n4 = &root;
| ^~
main.cpp:173:11: warning: unused variable 'n5' [-Wunused-variable]
173 | node* n5 = (node*)root.el[1];
| ^~
main.cpp: In function 'void dijkstra()':
main.cpp:195:33: error: 'INT_MAX' was not declared in this scope
195 | vector<int> costs(nodesC+1, INT_MAX);
| ^~~~~~~
main.cpp:8:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
7 | #include <algorithm>
+++ |+#include <climits>
8 |
main.cpp:221:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
221 | for(int i = 1; i < costs.size(); i++){
| ~~^~~~~~~~~~~~~~
main.cpp: In function 'void bellmanFord()':
main.cpp:238:33: error: 'INT_MAX' was not declared in this scope
238 | vector<int> costs(nodesC+1, INT_MAX);
| ^~~~~~~
main.cpp:238:33: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
main.cpp:246:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<std::pair<int, int> > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
246 | for(int k = 0; k < nodes.size()-1;k++){
| ~~^~~~~~~~~~~~~~~~
main.cpp:248:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<std::pair<int, int> > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
248 | for(int i = 1; i < nodes.size(); i++){
| ~~^~~~~~~~~~~~~~
main.cpp:260:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<std::pair<int, int> > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
260 | for(int i = 1; i < nodes.size(); i++) {
| ~~^~~~~~~~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !