Borderou de evaluare (job #2793780)
Utilizator | Data | 4 noiembrie 2021 00:07:34 | |
---|---|---|---|
Problema | Algoritmul lui Dijkstra | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:8:18: error: expected ']' before ';' token
8 | #define DIM 50000;
| ^
main.cpp:12:42: note: in expansion of macro 'DIM'
12 | vector<std::pair<int, int>>adjacencylist[DIM];
| ^~~
main.cpp:12:45: error: expected unqualified-id before ']' token
12 | vector<std::pair<int, int>>adjacencylist[DIM];
| ^
main.cpp:8:18: error: expected ']' before ';' token
8 | #define DIM 50000;
| ^
main.cpp:16:24: note: in expansion of macro 'DIM'
16 | int A, B, C, distances[DIM], N, M;
| ^~~
main.cpp:16:27: error: expected unqualified-id before ']' token
16 | int A, B, C, distances[DIM], N, M;
| ^
main.cpp: In function 'int main()':
main.cpp:24:7: error: 'N' was not declared in this scope
24 | f >> N >> M;
| ^
main.cpp:24:12: error: 'M' was not declared in this scope
24 | f >> N >> M;
| ^
main.cpp:29:3: error: 'adjacencylist' was not declared in this scope
29 | adjacencylist[A].push_back(std::make_pair(B, C));
| ^~~~~~~~~~~~~
main.cpp:33:3: error: 'distances' was not declared in this scope
33 | distances[i] = INF;
| ^~~~~~~~~
main.cpp:9:16: error: invalid type argument of unary '*' (have 'int')
9 | #define INF DIM*1000;
| ^~~~~
main.cpp:33:18: note: in expansion of macro 'INF'
33 | distances[i] = INF;
| ^~~
main.cpp:35:2: error: 'distances' was not declared in this scope
35 | distances[0] = 0;
| ^~~~~~~~~
main.cpp:37:35: error: expected ';' before 'while'
37 | tail.insert(std::make_pair(0, 1)) // cost from 1 to 1 is 0 ;
| ^
| ;
38 |
39 | while (!tail.empty()) // cat timp setul nu este gol;
| ~~~~~
main.cpp:61:7: warning: init-statement in selection statements only available with '-std=c++17' or '-std=gnu++17'
61 | if (distances[i] == INF)
| ^~~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !