Borderou de evaluare (job #3162049)
Utilizator | Data | 28 octombrie 2023 11:52:24 | |
---|---|---|---|
Problema | Algoritmul lui Dijkstra | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:12:5: error: 'll' does not name a type
12 | ll val;
| ^~
main.cpp: In member function 'bool date::operator<(const date&) const':
main.cpp:16:17: error: 'val' was not declared in this scope
16 | return (val >= b.val);
| ^~~
main.cpp:16:26: error: 'const struct date' has no member named 'val'
16 | return (val >= b.val);
| ^~~
main.cpp: At global scope:
main.cpp:23:1: error: 'll' does not name a type
23 | ll cost[MAX+5];
| ^~
main.cpp: In function 'void dijkstra(int)':
main.cpp:29:11: error: no matching function for call to 'std::priority_queue<date>::push(<brace-enclosed initializer list>)'
29 | Q.push({start,0});
| ~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/12.2.1/queue:64,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:86,
from main.cpp:1:
/usr/include/c++/12.2.1/bits/stl_queue.h:738:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = date; _Sequence = std::vector<date>; _Compare = std::less<date>; value_type = date]'
738 | push(const value_type& __x)
| ^~~~
/usr/include/c++/12.2.1/bits/stl_queue.h:738:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::priority_queue<date>::value_type&' {aka 'const date&'}
738 | push(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/12.2.1/bits/stl_queue.h:746:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(value_type&&) [with _Tp = date; _Sequence = std::vector<date>; _Compare = std::less<date>; value_type = date]'
746 | push(value_type&& __x)
| ^~~~
/usr/include/c++/12.2.1/bits/stl_queue.h:746:25: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::priority_queue<date>::value_type&&' {aka 'date&&'}
746 | push(value_type&& __x)
| ~~~~~~~~~~~~~^~~
main.cpp:30:5: error: 'cost' was not declared in this scope; did you mean 'cosl'?
30 | cost[start]=0;
| ^~~~
| cosl
main.cpp:40:28: error: 'struct date' has no member named 'val'
40 | if(cost[nod]+x.val<cost[x.nod])
| ^~~
main.cpp:42:41: error: 'struct date' has no member named 'val'
42 | cost[x.nod]=cost[nod]+x.val;
| ^~~
main.cpp:43:23: error: no matching function for call to 'std::priority_queue<date>::push(<brace-enclosed initializer list>)'
43 | Q.push({x.nod,cost[x.nod]});
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_queue.h:738:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = date; _Sequence = std::vector<date>; _Compare = std::less<date>; value_type = date]'
738 | push(const value_type& __x)
| ^~~~
/usr/include/c++/12.2.1/bits/stl_queue.h:738:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::priority_queue<date>::value_type&' {aka 'const date&'}
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !