Borderou de evaluare (job #3251707)
Utilizator | Data | 26 octombrie 2024 15:27:21 | |
---|---|---|---|
Problema | Sortare topologica | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'std::vector<int> bfs(std::vector<std::vector<int> >&, int)':
main.cpp:24:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
24 | for(int i=0; i<lista[node].size(); i++)
| ~^~~~~~~~~~~~~~~~~~~
main.cpp: In function 'void dfs(std::vector<std::vector<int> >&, int, std::vector<bool>&)':
main.cpp:39:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
39 | for(int i=0; i<lista[start].size(); i++)
| ~^~~~~~~~~~~~~~~~~~~~
main.cpp: In function 'std::vector<int> kahn(std::vector<std::vector<int> >&, std::vector<int>&)':
main.cpp:60:5: error: 'stack' was not declared in this scope
60 | stack<int> s;
| ^~~~~
main.cpp:5:1: note: 'std::stack' is defined in header '<stack>'; did you forget to '#include <stack>'?
4 | #include <algorithm>
+++ |+#include <stack>
5 | using namespace std;
main.cpp:60:11: error: expected primary-expression before 'int'
60 | stack<int> s;
| ^~~
main.cpp:62:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
62 | for (int i = 1; i < grade_in.size(); i++) {
| ~~^~~~~~~~~~~~~~~~~
main.cpp:64:15: error: request for member 'push' in 's', which is of non-class type 'int'
64 | s.push(i);
| ^~~~
main.cpp:68:15: error: request for member 'empty' in 's', which is of non-class type 'int'
68 | while (!s.empty()) {
| ^~~~~
main.cpp:69:25: error: request for member 'top' in 's', which is of non-class type 'int'
69 | int current = s.top();
| ^~~
main.cpp:70:11: error: request for member 'pop' in 's', which is of non-class type 'int'
70 | s.pop();
| ^~~
main.cpp:72:15: error: expected primary-expression before 'int'
72 | stack<int> aux;
| ^~~
main.cpp:77:17: error: 'aux' was not declared in this scope
77 | aux.push(node);
| ^~~
main.cpp:81:17: error: 'aux' was not declared in this scope
81 | while (!aux.empty()) {
| ^~~
main.cpp:82:15: error: request for member 'push' in 's', which is of non-class type 'int'
82 | s.push(aux.top());
| ^~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !