#671
Inordine
Se dă un arbore binar care conține valori numere naturale. Să se afișeze valorile din arbore în urma parcurgerii în inordine.
Problema | Inordine | Operații I/O |
inordine.in /inordine.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53250902 | Utilizator | |
Fișier | inordine.cpp | Dimensiune | 869 B |
Data încărcării | 22 Octombrie 2024, 14:02 | Scor / rezultat | Eroare de compilare |
inordine.cpp:9:13: error: 'NN' was not declared in this scope int n, info[NN], st[NN], dr[NN]; ^ inordine.cpp:9:21: error: 'NN' was not declared in this scope int n, info[NN], st[NN], dr[NN]; ^ inordine.cpp:9:29: error: 'NN' was not declared in this scope int n, info[NN], st[NN], dr[NN]; ^ inordine.cpp: In function 'void citire()': inordine.cpp:15:16: error: 'info' was not declared in this scope fin >> info[i] >> st[i] >> dr[i]; ^ inordine.cpp:15:27: error: 'st' was not declared in this scope fin >> info[i] >> st[i] >> dr[i]; ^ inordine.cpp:15:36: error: 'dr' was not declared in this scope fin >> info[i] >> st[i] >> dr[i]; ^ inordine.cpp: In function 'int radacina()': inordine.cpp:20:11: error: 'NN' was not declared in this scope int v[NN]; ^ inordine.cpp:22:9: error: 'v' was not declared in this scope v[i] = 0; ^ inordine.cpp:25:12: error: 'st' was not declared in this scope if(st[i] != 0) ^ inordine.cpp:26:13: error: 'v' was not declared in this scope v[st[i]] = 1; ^ inordine.cpp:27:12: error: 'dr' was not declared in this scope if(dr[i] != 0) ^ inordine.cpp:28:13: error: 'v' was not declared in this scope v[dr[i]] = 1; ^ inordine.cpp:31:12: error: 'v' was not declared in this scope if(v[i] == 0) ^ inordine.cpp: In function 'void inordine(int)': inordine.cpp:40:18: error: 'st' was not declared in this scope inordine(st[x]); ^ inordine.cpp:41:17: error: 'info' was not declared in this scope fout << info[x] << " "; ^ inordine.cpp:43:18: error: 'dr' was not declared in this scope inordine(dr[x]); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Inordine 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ă.