Borderou de evaluare (job #3285346)
Utilizator | Data | 12 martie 2025 19:05:24 | |
---|---|---|---|
Problema | Algoritmul lui Dijkstra | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:23:5: error: ISO C++ forbids declaration of 'operator()' with no type [-fpermissive]
23 | operator()(int a,int b)const
| ^~~~~~~~
main.cpp:29:32: error: 'comp' was not declared in this scope; did you mean 'Comp'?
29 | priority_queue<int,vector<int>,comp>q;
| ^~~~
| Comp
main.cpp:29:36: error: template argument 3 is invalid
29 | priority_queue<int,vector<int>,comp>q;
| ^
main.cpp: In function 'void dijkstra(int)':
main.cpp:45:7: error: request for member 'push' in 'q', which is of non-class type 'int'
45 | q.push(nod);
| ^~~~
main.cpp:46:14: error: request for member 'empty' in 'q', which is of non-class type 'int'
46 | while(!q.empty())
| ^~~~~
main.cpp:48:15: error: request for member 'top' in 'q', which is of non-class type 'int'
48 | crt=q.top();
| ^~~
main.cpp:49:11: error: request for member 'pop' in 'q', which is of non-class type 'int'
49 | q.pop();
| ^~~
main.cpp:59:23: error: request for member 'push' in 'q', which is of non-class type 'int'
59 | q.push(mm.y);
| ^~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !