#646
Se dă vectorul de tați al unui arbore cu rădăcină cu n
noduri și un nod k
. Afișați, în ordine crescătoare, nodurile terminale din subarborele cu rădăcina în k
.
Problema | Subarbore1 | Operații I/O |
![]() subarbore1.in /subarbore1.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57466659 | Utilizator | |
Fișier | subarbore1.cpp | Dimensiune | 1.26 KB |
Data încărcării | 01 Aprilie 2025, 12:44 | Scor / rezultat | Eroare de compilare |
subarbore1.cpp:65:10: error: redefinition of 'unsigned int n' unsigned n,k,a[101],v[101],r[101],rad; ^ subarbore1.cpp:7:10: error: 'unsigned int n' previously declared here unsigned n,k,a[101],v[101],r[101]; ^ subarbore1.cpp:65:12: error: redefinition of 'unsigned int k' unsigned n,k,a[101],v[101],r[101],rad; ^ subarbore1.cpp:7:12: error: 'unsigned int k' previously declared here unsigned n,k,a[101],v[101],r[101]; ^ subarbore1.cpp:65:19: error: redefinition of 'unsigned int a [101]' unsigned n,k,a[101],v[101],r[101],rad; ^ subarbore1.cpp:7:14: error: 'unsigned int a [101]' previously declared here unsigned n,k,a[101],v[101],r[101]; ^ subarbore1.cpp:65:26: error: redefinition of 'unsigned int v [101]' unsigned n,k,a[101],v[101],r[101],rad; ^ subarbore1.cpp:7:21: error: 'unsigned int v [101]' previously declared here unsigned n,k,a[101],v[101],r[101]; ^ subarbore1.cpp:65:33: error: redefinition of 'unsigned int r [101]' unsigned n,k,a[101],v[101],r[101],rad; ^ subarbore1.cpp:7:28: error: 'unsigned int r [101]' previously declared here unsigned n,k,a[101],v[101],r[101]; ^ subarbore1.cpp: In function 'void _walk(unsigned int)': subarbore1.cpp:67:6: error: redefinition of 'void _walk(unsigned int)' void _walk(unsigned nod) ^ subarbore1.cpp:9:6: error: 'void _walk(unsigned int)' previously defined here void _walk(unsigned nod) ^ subarbore1.cpp: In function 'int main()': subarbore1.cpp:87:5: error: redefinition of 'int main()' int main() ^ subarbore1.cpp:27:5: error: 'int main()' previously defined here int main() ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Subarbore1 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ă.