#1652
RF
Se dă un graf orientat în care arcele au asociate costuri (numere naturale nenule). Să se determine câte arce (x,y)
din graf au costul egal cu costul drumului de cost minim de la x
la y
.
Problema | RF | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #28532720 | Utilizator | |
Fișier | rf.cpp | Dimensiune | 2.27 KB |
Data încărcării | 09 Martie 2021, 15:15 | Scor / rezultat | Eroare de compilare |
rf.cpp:78:2: error: expected unqualified-id before numeric constant }1887 ^ rf.cpp:84:5: error: redefinition of 'int n' int n , m , cnt , c[101][101] , tata[101][101] , x , y , w; ^ rf.cpp:11:18: error: 'int n' previously declared here int a[101][101], n, f[1000000],d[1000000],ok,p,ma,s,c; ^ rf.cpp:84:29: error: conflicting declaration 'int c [101][101]' int n , m , cnt , c[101][101] , tata[101][101] , x , y , w; ^ rf.cpp:11:53: error: 'c' has a previous declaration as 'int c' int a[101][101], n, f[1000000],d[1000000],ok,p,ma,s,c; ^ rf.cpp: In function 'void Floyd_Warshall()': rf.cpp:91:34: error: invalid types 'int[int]' for array subscript if (i != j && c[i][j] > c[i][k] + c[k][j]) ^ rf.cpp:91:44: error: invalid types 'int[int]' for array subscript if (i != j && c[i][j] > c[i][k] + c[k][j]) ^ rf.cpp:91:54: error: invalid types 'int[int]' for array subscript if (i != j && c[i][j] > c[i][k] + c[k][j]) ^ rf.cpp:92:24: error: invalid types 'int[int]' for array subscript c[i][j] = c[i][k] + c[k][j]; ^ rf.cpp:92:34: error: invalid types 'int[int]' for array subscript c[i][j] = c[i][k] + c[k][j]; ^ rf.cpp:92:44: error: invalid types 'int[int]' for array subscript c[i][j] = c[i][k] + c[k][j]; ^ rf.cpp: In function 'int main()': rf.cpp:95:5: error: redefinition of 'int main()' int main() ^ rf.cpp:60:5: error: 'int main()' previously defined here int main() ^ rf.cpp:101:28: error: invalid types 'int[int]' for array subscript if (i != j) c[i][j] = Inf; ^ rf.cpp:106:12: error: invalid types 'int[int]' for array subscript c[x][y] = w; ^ rf.cpp:114:33: error: invalid types 'int[int]' for array subscript if(tata[i][j] == c[i][j] && tata[i][j] != 0) cnt++; ^ rf.cpp:116:16: error: expected '}' at end of input cout << cnt; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema RF 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ă.