#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 | #35035199 | Utilizator | |
Fișier | lantmaxim.cpp | Dimensiune | 1.05 KB |
Data încărcării | 23 Februarie 2022, 12:53 | Scor / rezultat | Eroare de compilare |
lantmaxim.cpp:9:10: error: expected initializer before 'a' int n, m a[105][105], viz[205], p, q, r; ^ lantmaxim.cpp: In function 'bool cond(int)': lantmaxim.cpp:15:9: error: 'viz' was not declared in this scope if (viz[k] == r) ^ lantmaxim.cpp:15:19: error: 'r' was not declared in this scope if (viz[k] == r) ^ lantmaxim.cpp:17:9: error: 'a' was not declared in this scope if (a[viz[k - 1]][viz[k]] != 1) ^ lantmaxim.cpp:17:11: error: 'viz' was not declared in this scope if (a[viz[k - 1]][viz[k]] != 1) ^ lantmaxim.cpp:20:13: error: 'viz' was not declared in this scope if (viz[k] == viz[i]) ^ lantmaxim.cpp: In function 'void afis(int)': lantmaxim.cpp:29:17: error: 'viz' was not declared in this scope fout << viz[i] << " "; ^ lantmaxim.cpp: In function 'void back(int)': lantmaxim.cpp:38:9: error: 'viz' was not declared in this scope viz[k] = i; ^ lantmaxim.cpp:41:27: error: 'q' was not declared in this scope if (viz[k] == q) ^ lantmaxim.cpp: In function 'void citire()': lantmaxim.cpp:51:17: error: 'm' was not declared in this scope fin >> n >> m; ^ lantmaxim.cpp:55:9: error: 'a' was not declared in this scope a[i][j] = a[j][i] = 1; ^ lantmaxim.cpp:58:12: error: 'p' was not declared in this scope fin >> p >> q >> r; ^ lantmaxim.cpp:58:17: error: 'q' was not declared in this scope fin >> p >> q >> r; ^ lantmaxim.cpp:58:22: error: 'r' was not declared in this scope fin >> p >> q >> r; ^ lantmaxim.cpp: In function 'int main()': lantmaxim.cpp:64:5: error: 'viz' was not declared in this scope viz[1] = p; ^ lantmaxim.cpp:64:14: error: 'p' was not declared in this scope viz[1] = p; ^
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ă.