#4027
LongestPath
Se dă un graf orientat aciclic (adică nu există circuite). Lungimea unui drum elementar este dată de numărul de arce. Să se determine lungimea maximă a unui drum elementar în acest graf orientat aciclic.
Folclorul informatic
Problema | LongestPath | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.4 secunde | Limita memorie |
Total: 128 MB
/
Stivă 64 MB
|
Id soluție | #49923650 | Utilizator | |
Fișier | longestpath.cpp | Dimensiune | 900 B |
Data încărcării | 20 Martie 2024, 09:25 | Scor / rezultat | Eroare de compilare |
longestpath.cpp:4:35: error: size of array 'a' is too large int INF=INT_MIN/2,a[100001][100001],c[100001][100001],n,m; ^ longestpath.cpp:4:53: error: size of array 'c' is too large int INF=INT_MIN/2,a[100001][100001],c[100001][100001],n,m; ^ longestpath.cpp: In function 'void citire()': longestpath.cpp:12:22: error: 'c' was not declared in this scope if(i!=j) c[i][j]=INF; ^ longestpath.cpp:17:9: error: 'a' was not declared in this scope a[x][y]=1; ^ longestpath.cpp:18:9: error: 'c' was not declared in this scope c[x][y]=1; ^ longestpath.cpp: In function 'void royfloyd()': longestpath.cpp:25:21: error: 'c' was not declared in this scope if( c[i][k]+c[k][j]>c[i][j] && i!=j && i!=k && j!=k && c[i][k]!=INF && c[k][j]!=INF) ^ longestpath.cpp: In function 'int main()': longestpath.cpp:37:16: error: 'c' was not declared in this scope if(c[i][j]>maxx) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema LongestPath 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ă.