Borderou de evaluare (job #2870662)
| Utilizator | Data | 12 martie 2022 14:51:55 | |
|---|---|---|---|
| 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:16:20: warning: init-statement in selection statements only available with '-std=c++17' or '-std=gnu++17'
16 | if(a[i][k] && a[k][j] && (a[i][k]+a[k][j]<a[i][j] || !a[i][j] && i!=j)
| ^
main.cpp:16:79: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
16 | if(a[i][k] && a[k][j] && (a[i][k]+a[k][j]<a[i][j] || !a[i][j] && i!=j)
| ~~~~~~~~~^~~~~~~
main.cpp:16:87: error: expected ';' before 'a'
16 | if(a[i][k] && a[k][j] && (a[i][k]+a[k][j]<a[i][j] || !a[i][j] && i!=j)
| ^
| ;
17 | a[i][j]=a[i][k]+a[k][j];
| ~
main.cpp:16:39: warning: statement has no effect [-Wunused-value]
16 | if(a[i][k] && a[k][j] && (a[i][k]+a[k][j]<a[i][j] || !a[i][j] && i!=j)
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:18:6: error: expected primary-expression before 'for'
18 | for(i=1;i<=n;i++)
| ^~~
main.cpp:17:45: error: expected ')' before 'for'
17 | a[i][j]=a[i][k]+a[k][j];
| ^
| )
18 | for(i=1;i<=n;i++)
| ~~~
main.cpp:16:19: note: to match this '('
16 | if(a[i][k] && a[k][j] && (a[i][k]+a[k][j]<a[i][j] || !a[i][j] && i!=j)
| ^
main.cpp:16:17: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
16 | if(a[i][k] && a[k][j] && (a[i][k]+a[k][j]<a[i][j] || !a[i][j] && i!=j)
| ^~
main.cpp:18:14: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
18 | for(i=1;i<=n;i++)
| ^
main.cpp:18:15: warning: statement has no effect [-Wunused-value]
18 | for(i=1;i<=n;i++)
| ~^~~
main.cpp:18:22: error: expected ';' before ')' token
18 | 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 !
