Borderou de evaluare (job #2946010)
Utilizator | Data | 24 noiembrie 2022 14:23:13 | |
---|---|---|---|
Problema | Retea2 | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
In file included from /usr/include/c++/10/cmath:45,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from main.cpp:1:
main.cpp: In function 'int main()':
main.cpp:26:21: error: expected unqualified-id before '(' token
26 | dista.resize(m. INFINITY);
| ^~~~~~~~
main.cpp:33:18: error: 'dist' was not declared in this scope; did you mean 'dista'?
33 | pq.push({dist[i], i});
| ^~~~
| dista
main.cpp:33:29: error: no matching function for call to 'std::priority_queue<std::pair<double, int>, std::vector<std::pair<double, int> >, std::greater<void> >::push(<brace-enclosed initializer list>)'
33 | pq.push({dist[i], i});
| ^
In file included from /usr/include/c++/10/queue:64,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
from main.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:640:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<double, int>; _Sequence = std::vector<std::pair<double, int> >; _Compare = std::greater<void>; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<double, int>]'
640 | push(const value_type& __x)
| ^~~~
/usr/include/c++/10/bits/stl_queue.h:640:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const std::pair<double, int>&'}
640 | push(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_queue.h:648:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(std::priority_queue<_Tp, _Sequence, _Compare>::value_type&&) [with _Tp = std::pair<double, int>; _Sequence = std::vector<std::pair<double, int> >; _Compare = std::greater<void>; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<double, int>]'
648 | push(value_type&& __x)
| ^~~~
/usr/include/c++/10/bits/stl_queue.h:648:25: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::priority_queue<std::pair<double, int>, std::vector<std::pair<double, int> >, std::greater<void> >::value_type&&' {aka 'std::pair<double, int>&&'}
648 | push(value_type&& __x)
| ~~~~~~~~~~~~~^~~
main.cpp:49:17: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
49 | if(i!=top.second)
| ~^~~~~~~~~~~~
main.cpp:51:17: error: 'oddValue' was not declared in this scope; did you mean 'oldValue'?
51 | oddValue=dista[i];
| ^~~~~~~~
| oldValue
main.cpp:37:27: warning: unused variable 'oldValue' [-Wunused-variable]
37 | double finalcost=0.0, oldValue;
| ^~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !