Borderou de evaluare (job #2870660)
| Utilizator | Data | 12 martie 2022 14:50:25 | |
|---|---|---|---|
| Problema | Floyd-Warshall/Roy-Floyd | Status | done |
| Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:14:20: warning: init-statement in selection statements only available with '-std=c++17' or '-std=gnu++17'
14 | if(a[i][k] && a[k][j] && (a[i][k]+a[k][j]<a[i][j] || !a[i][j] && i!=j)
| ^
main.cpp:14:79: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
14 | if(a[i][k] && a[k][j] && (a[i][k]+a[k][j]<a[i][j] || !a[i][j] && i!=j)
| ~~~~~~~~~^~~~~~~
main.cpp:14:87: error: expected ';' before 'a'
14 | if(a[i][k] && a[k][j] && (a[i][k]+a[k][j]<a[i][j] || !a[i][j] && i!=j)
| ^
| ;
15 | a[i][j]=a[i][k]+a[k][j];
| ~
main.cpp:14:39: warning: statement has no effect [-Wunused-value]
14 | if(a[i][k] && a[k][j] && (a[i][k]+a[k][j]<a[i][j] || !a[i][j] && i!=j)
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:16:6: error: expected primary-expression before 'for'
16 | for(i=1;i<=n;i++)
| ^~~
main.cpp:15:45: error: expected ')' before 'for'
15 | a[i][j]=a[i][k]+a[k][j];
| ^
| )
16 | for(i=1;i<=n;i++)
| ~~~
main.cpp:14:19: note: to match this '('
14 | if(a[i][k] && a[k][j] && (a[i][k]+a[k][j]<a[i][j] || !a[i][j] && i!=j)
| ^
main.cpp:14:17: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
14 | if(a[i][k] && a[k][j] && (a[i][k]+a[k][j]<a[i][j] || !a[i][j] && i!=j)
| ^~
main.cpp:16:14: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
16 | for(i=1;i<=n;i++)
| ^
main.cpp:16:15: warning: statement has no effect [-Wunused-value]
16 | for(i=1;i<=n;i++)
| ~^~~
main.cpp:16:22: error: expected ';' before ')' token
16 | for(i=1;i<=n;i++)
| ^
| ;
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
