#1887
Dijkstra2
Dijkstra are nevoie de ajutorul vostru pentru a-și duce la bun sfârșit datoria. Acesta vrea să afle drumurile de lungime minimă de la casa prietenului său Vlad la celelalte case ale vecinilor. Nu are foarte mult timp la dispoziție așa ca trebuie să vă mișcați repede. Îl veți ajuta?
Problema | Dijkstra2 | Operații I/O |
dijkstra2.in /dijkstra2.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #22062915 | Utilizator | |
Fișier | dijkstra2.cpp | Dimensiune | 1.14 KB |
Data încărcării | 24 Martie 2020, 10:18 | Scor / rezultat | Eroare de compilare |
dijkstra2.cpp:3:10: warning: ISO C99 requires whitespace after the macro name [enabled by default] #define a[100001][100001] ^ dijkstra2.cpp: In function 'void dijkstra(int)': dijkstra2.cpp:3:11: error: expected identifier before numeric constant #define a[100001][100001] ^ dijkstra2.cpp:14:14: note: in expansion of macro 'a' d[i]=a[k][i]; ^ dijkstra2.cpp: In lambda function: dijkstra2.cpp:3:18: error: expected '{' before '[' token #define a[100001][100001] ^ dijkstra2.cpp:14:14: note: in expansion of macro 'a' d[i]=a[k][i]; ^ dijkstra2.cpp: In function 'void dijkstra(int)': dijkstra2.cpp:3:18: error: no match for 'operator[]' (operand types are 'dijkstra(int)::__lambda0' and 'int') #define a[100001][100001] ^ dijkstra2.cpp:14:14: note: in expansion of macro 'a' d[i]=a[k][i]; ^ dijkstra2.cpp:3:11: error: expected identifier before numeric constant #define a[100001][100001] ^ dijkstra2.cpp:30:41: note: in expansion of macro 'a' if(viz[i]==0&&d[i]>d[w]+a[w][i]) ^ dijkstra2.cpp: In lambda function: dijkstra2.cpp:3:18: error: expected '{' before '[' token #define a[100001][100001] ^ dijkstra2.cpp:30:41: note: in expansion of macro 'a' if(viz[i]==0&&d[i]>d[w]+a[w][i]) ^ dijkstra2.cpp: In function 'void dijkstra(int)': dijkstra2.cpp:3:18: error: no match for 'operator[]' (operand types are 'dijkstra(int)::__lambda1' and 'int') #define a[100001][100001] ^ dijkstra2.cpp:30:41: note: in expansion of macro 'a' if(viz[i]==0&&d[i]>d[w]+a[w][i]) ^ dijkstra2.cpp:3:11: error: expected identifier before numeric constant #define a[100001][100001] ^ dijkstra2.cpp:31:27: note: in expansion of macro 'a' { d[i]=d[w]+a[w][i]; ^ dijkstra2.cpp: In lambda function: dijkstra2.cpp:3:18: error: expected '{' before '[' token #define a[100001][100001] ^ dijkstra2.cpp:31:27: note: in expansion of macro 'a' { d[i]=d[w]+a[w][i]; ^ dijkstra2.cpp: In function 'void dijkstra(int)': dijkstra2.cpp:3:18: error: no match for 'operator[]' (operand types are 'dijkstra(int)::__lambda2' and 'int') #define a[100001][100001] ^ dijkstra2.cpp:31:27: note: in expansion of macro 'a' { d[i]=d[w]+a[w][i]; ^ dijkstra2.cpp: In function 'int main()': dijkstra2.cpp:3:11: error: expected identifier before numeric constant #define a[100001][100001] ^ dijkstra2.cpp:43:9: note: in expansion of macro 'a' a[x][y]=a[y][x]=inf; ^ dijkstra2.cpp: In lambda function: dijkstra2.cpp:3:18: error: expected '{' before '[' token #define a[100001][100001] ^ dijkstra2.cpp:43:9: note: in expansion of macro 'a' a[x][y]=a[y][x]=inf; ^ dijkstra2.cpp: In function 'int main()': dijkstra2.cpp:3:18: error: no match for 'operator[]' (operand types are 'main()::__lambda3' and 'int') #define a[100001][100001] ^ dijkstra2.cpp:43:9: note: in expansion of macro 'a' a[x][y]=a[y][x]=inf; ^ dijkstra2.cpp:3:11: error: expected identifier before numeric constant #define a[100001][100001] ^ dijkstra2.cpp:43:17: note: in expansion of macro 'a' a[x][y]=a[y][x]=inf; ^ dijkstra2.cpp: In lambda function: dijkstra2.cpp:3:18: error: expected '{' before '[' token #define a[100001][100001] ^ dijkstra2.cpp:43:17: note: in expansion of macro 'a' a[x][y]=a[y][x]=inf; ^ dijkstra2.cpp: In function 'int main()': dijkstra2.cpp:3:18: error: no match for 'operator[]' (operand types are 'main()::__lambda4' and 'int') #define a[100001][100001] ^ dijkstra2.cpp:43:17: note: in expansion of macro 'a' a[x][y]=a[y][x]=inf; ^ dijkstra2.cpp:3:11: error: expected identifier before numeric constant #define a[100001][100001] ^ dijkstra2.cpp:47:6: note: in expansion of macro 'a' a[x][y]=a[y][x]=c; ^ dijkstra2.cpp: In lambda function: dijkstra2.cpp:3:18: error: expected '{' before '[' token #define a[100001][100001] ^ dijkstra2.cpp:47:6: note: in expansion of macro 'a' a[x][y]=a[y][x]=c; ^ dijkstra2.cpp: In function 'int main()': dijkstra2.cpp:3:18: error: no match for 'operator[]' (operand types are 'main()::__lambda5' and 'int') #define a[100001][100001] ^ dijkstra2.cpp:47:6: note: in expansion of macro 'a' a[x][y]=a[y][x]=c; ^ dijkstra2.cpp:3:11: error: expected identifier before numeric constant #define a[100001][100001] ^ dijkstra2.cpp:47:14: note: in expansion of macro 'a' a[x][y]=a[y][x]=c; ^ dijkstra2.cpp: In lambda function: dijkstra2.cpp:3:18: error: expected '{' before '[' token #define a[100001][100001] ^ dijkstra2.cpp:47:14: note: in expansion of macro 'a' a[x][y]=a[y][x]=c; ^ dijkstra2.cpp: In function 'int main()': dijkstra2.cpp:3:18: error: no match for 'operator[]' (operand types are 'main()::__lambda6' and 'int') #define a[100001][100001] ^ dijkstra2.cpp:47:14: note: in expansion of macro 'a' a[x][y]=a[y][x]=c; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Dijkstra2 face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.