Borderou de evaluare (job #3192479)
Utilizator | Data | 12 ianuarie 2024 18:04:47 | |
---|---|---|---|
Problema | Arbore partial de cost minim | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:16:17: error: 'link' does not name a type
16 | bool cmp (const link& me, const link& foreign) {
| ^~~~
main.cpp:16:33: error: 'link' does not name a type
16 | bool cmp (const link& me, const link& foreign) {
| ^~~~
main.cpp: In function 'bool cmp(const int&, const int&)':
main.cpp:17:15: error: request for member 'value' in 'me', which is of non-class type 'const int'
17 | return me.value < foreign.value;
| ^~~~~
main.cpp:17:31: error: request for member 'value' in 'foreign', which is of non-class type 'const int'
17 | return me.value < foreign.value;
| ^~~~~
main.cpp: In function 'int main()':
main.cpp:24:19: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
24 | vector<vector<link>> G(E+1);
| ^~~~
main.cpp:24:19: note: expected a type, got 'link'
main.cpp:24:19: error: template argument 2 is invalid
main.cpp:24:23: error: template argument 1 is invalid
24 | vector<vector<link>> G(E+1);
| ^~
main.cpp:24:23: error: template argument 2 is invalid
main.cpp:26:16: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
26 | vector<link> _h;
| ^
main.cpp:26:16: note: expected a type, got 'link'
main.cpp:26:16: error: template argument 2 is invalid
main.cpp:29:9: error: expected ';' before 'startNode'
29 | link startNode = {-1,-1,INT_MAX};
| ^~~~~~~~~~
| ;
main.cpp:29:5: warning: statement is a reference, not call, to function 'link' [-Waddress]
29 | link startNode = {-1,-1,INT_MAX};
| ^~~~
main.cpp:29:5: warning: statement has no effect [-Wunused-value]
main.cpp:33:10: error: invalid types 'int[int]' for array subscript
33 | G[nodeA].push_back({nodeA,nodeB,weight});
| ^
main.cpp:34:10: error: invalid types 'int[int]' for array subscript
34 | G[nodeB].push_back({nodeB,nodeA,weight});
| ^
main.cpp:35:13: error: 'startNode' was not declared in this scope; did you mean 'startNodeA'?
35 | if (startNode.value > weight) {
| ^~~~~~~~~
| startNodeA
main.cpp:42:21: error: 'startNode' was not declared in this scope; did you mean 'startNodeA'?
42 | for (auto& i: G[startNode.nodeA]) {
| ^~~~~~~~~
| startNodeA
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !