#479
LantMaxim
Se dă lista muchiilor unui graf neorientat cu n
vârfuri și două vârfuri p q
. Să se determine cel mai lung lanț elementar cu extremitățile p
și q
.
Problema | LantMaxim | Operații I/O |
lantmaxim.in /lantmaxim.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #15854468 | Utilizator | |
Fișier | lantmaxim.cpp | Dimensiune | 377 B |
Data încărcării | 16 Mai 2019, 11:41 | Scor / rezultat | Eroare de compilare |
lantmaxim.cpp: In function 'void cop(int)': lantmaxim.cpp:4:5: error: 'l' was not declared in this scope l[i]=x[i]; ^ lantmaxim.cpp:4:10: error: 'x' was not declared in this scope l[i]=x[i]; ^ lantmaxim.cpp: In function 'void bkt(int)': lantmaxim.cpp:9:13: error: 'n' was not declared in this scope for (i=1;i<=n;i++) ^ lantmaxim.cpp:10:4: error: 'x' was not declared in this scope {x[k]=i; ^ lantmaxim.cpp:11:14: error: 'valid' was not declared in this scope if (valid(k)) ^ lantmaxim.cpp:12:12: error: 'q' was not declared in this scope if(x[k]==q&&k>mx){mx=k;cop(k);} ^ lantmaxim.cpp:12:17: error: 'mx' was not declared in this scope if(x[k]==q&&k>mx){mx=k;cop(k);} ^ lantmaxim.cpp:11:6: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if (valid(k)) ^ lantmaxim.cpp: In function 'int main()': lantmaxim.cpp:21:5: error: 'f' was not declared in this scope f>>n>>m; ^ lantmaxim.cpp:21:8: error: 'n' was not declared in this scope f>>n>>m; ^ lantmaxim.cpp:21:11: error: 'm' was not declared in this scope f>>n>>m; ^ lantmaxim.cpp:23:5: error: 't' was not declared in this scope {f>>t>>y; ^ lantmaxim.cpp:23:8: error: 'y' was not declared in this scope {f>>t>>y; ^ lantmaxim.cpp:24:5: error: 'a' was not declared in this scope a[t][y]=1; ^ lantmaxim.cpp:27:6: error: 'p' was not declared in this scope f>>p>>q; ^ lantmaxim.cpp:27:9: error: 'q' was not declared in this scope f>>p>>q; ^ lantmaxim.cpp:28:1: error: 'x' was not declared in this scope x[1]=p; ^ lantmaxim.cpp:30:10: error: 'mx' was not declared in this scope afis (mx); ^ lantmaxim.cpp:30:12: error: 'afis' was not declared in this scope afis (mx); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema LantMaxim 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ă.