#637
Se dă vectorul de tați al unui arbore cu rădăcină cu n noduri. Determinați rădăcina arborelui și frunzele acestuia.
| Problema | Frunze | Operații I/O |
frunze.in/frunze.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64164783 | Utilizator | |
| Fișier | frunze.cpp | Dimensiune | 1.05 KB |
| Data încărcării | 21 Aprilie 2026, 10:43 | Scor/rezultat | Eroare de compilare |
frunze.cpp:29:2: error: stray ‘#’ in program 29 | }#include <iostream> | ^ frunze.cpp:29:3: error: ‘include’ does not name a type 29 | }#include <iostream> | ^~~~~~~ frunze.cpp:32:10: error: redefinition of ‘std::ifstream fin’ 32 | ifstream fin("frunze.in"); | ^~~ frunze.cpp:4:10: note: ‘std::ifstream fin’ previously declared here 4 | ifstream fin("frunze.in"); | ^~~ frunze.cpp:33:10: error: redefinition of ‘std::ofstream fout’ 33 | ofstream fout("frunze.out"); | ^~~~ frunze.cpp:5:10: note: ‘std::ofstream fout’ previously declared here 5 | ofstream fout("frunze.out"); | ^~~~ frunze.cpp:34:5: error: redefinition of ‘int n’ 34 | int n , t[105], v[105]; | ^ frunze.cpp:6:5: note: ‘int n’ previously declared here 6 | int n , t[105], v[105]; | ^ frunze.cpp:34:9: error: redefinition of ‘int t [105]’ 34 | int n , t[105], v[105]; | ^ frunze.cpp:6:9: note: ‘int t [105]’ previously declared here 6 | int n , t[105], v[105]; | ^ frunze.cpp:34:17: error: redefinition of ‘int v [105]’ 34 | int n , t[105], v[105]; | ^ frunze.cpp:6:17: note: ‘int v [105]’ previously declared here 6 | int n , t[105], v[105]; | ^ frunze.cpp:35:5: error: redefinition of ‘int main()’ 35 | int main() | ^~~~ frunze.cpp:7:5: note: ‘int main()’ previously defined here 7 | int main() | ^~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Frunze 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ă.