#4061
LantQ
Se dă un graf neorientat cu n vârfuri și un număr natural q
. Să se determine toate lanțurile elementare formate din cel puțin o muchie, cu extremitatea finală în vârful q
.
Problema | LantQ | Operații I/O |
![]() lantq.in /lantq.out
|
---|---|---|---|
Limita timp | 0.4 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57778528 | Utilizator | |
Fișier | lantq.cpp | Dimensiune | 637 B |
Data încărcării | 15 Aprilie 2025, 19:18 | Scor / rezultat | Eroare de compilare |
lantq.cpp: In function 'void backt(int)': lantq.cpp:3:26: error: 'n' was not declared in this scope for (int i = 1; i <= n; i++) ^ lantq.cpp:4:13: error: 'A' was not declared in this scope if (A[sol[k - 1]][i] == 1 && viz[i] == 0) ^ lantq.cpp:4:15: error: 'sol' was not declared in this scope if (A[sol[k - 1]][i] == 1 && viz[i] == 0) ^ lantq.cpp:4:38: error: 'viz' was not declared in this scope if (A[sol[k - 1]][i] == 1 && viz[i] == 0) ^ lantq.cpp:7:27: error: 'q' was not declared in this scope if (sol[k] == q) ^ lantq.cpp:8:26: error: 'afisare' was not declared in this scope afisare(k); ^ lantq.cpp: In function 'int main()': lantq.cpp:20:12: error: 'citire' was not declared in this scope citire(); ^ lantq.cpp:21:26: error: 'n' was not declared in this scope for (int i = 1; i <= n; i++) ^ lantq.cpp:23:18: error: 'q' was not declared in this scope if (i == q) continue; ^ lantq.cpp:24:9: error: 'sol' was not declared in this scope sol[1] = i; ^ lantq.cpp:25:9: error: 'viz' was not declared in this scope viz[i] = 1; ^ lantq.cpp:29:10: error: 'ok' was not declared in this scope if (!ok) ^ lantq.cpp:30:9: error: 'g' was not declared in this scope g << "NU EXISTA"; ^ lantq.cpp:31:5: error: 'f' was not declared in this scope f.close(); ^ lantq.cpp:32:5: error: 'g' was not declared in this scope g.close(); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema LantQ 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ă.