Borderou de evaluare (job #2946035)
Utilizator | Data | 24 noiembrie 2022 14:52:00 | |
---|---|---|---|
Problema | Catun | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:7:24: error: 'NMAX' was not declared in this scope
7 | vector<pair<int,int>>v[NMAX];
| ^~~~
main.cpp:8:13: error: 'NMAX' was not declared in this scope
8 | int costuri[NMAX],tata[NMAX];
| ^~~~
main.cpp:8:24: error: 'NMAX' was not declared in this scope
8 | int costuri[NMAX],tata[NMAX];
| ^~~~
main.cpp:11:10: error: 'NMAX' was not declared in this scope
11 | bool viz[NMAX];
| ^~~~
main.cpp: In function 'void dijkstra()':
main.cpp:20:12: error: 'viz' was not declared in this scope
20 | if(viz[nod]==1)
| ^~~
main.cpp:22:9: error: 'viz' was not declared in this scope
22 | viz[nod]=1;
| ^~~
main.cpp:23:23: error: 'v' was not declared in this scope
23 | for(int i=0;i<v[nod].size();i++)
| ^
main.cpp:27:16: error: 'costuri' was not declared in this scope; did you mean 'costv'?
27 | if(costuri[vecin]>cost+costv)
| ^~~~~~~
| costv
main.cpp:30:17: error: 'tata' was not declared in this scope
30 | tata[vecin]=tata[nod];
| ^~~~
main.cpp:31:47: error: no matching function for call to 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::push(<brace-enclosed initializer list>)'
31 | pq.push({costuri[vecin],vecin});
| ^
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<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, 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<int, 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<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, 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<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::value_type&&' {aka 'std::pair<int, int>&&'}
648 | push(value_type&& __x)
| ~~~~~~~~~~~~~^~~
main.cpp:34:48: error: 'tata' was not declared in this scope
34 | if(costuri[vecin]==cost+costv&&tata[vecin]>tata[nod])
| ^~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !