#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 | #41108361 | Utilizator | |
Fișier | inordine.cpp | Dimensiune | 778 B |
Data încărcării | 12 Ianuarie 2023, 13:49 | Scor / rezultat | Eroare de compilare |
inordine.cpp:7:13: error: 'NN' was not declared in this scope int n, info[NN], st[NN],dr[NN]; ^ inordine.cpp:7:21: error: 'NN' was not declared in this scope int n, info[NN], st[NN],dr[NN]; ^ inordine.cpp:7:28: error: 'NN' was not declared in this scope int n, info[NN], st[NN],dr[NN]; ^ inordine.cpp: In function 'void citire()': inordine.cpp:12:14: error: 'info' was not declared in this scope fin>>info[i]>>st[i]>>dr[i]; ^ inordine.cpp:12:23: error: 'st' was not declared in this scope fin>>info[i]>>st[i]>>dr[i]; ^ inordine.cpp:12:30: error: 'dr' was not declared in this scope fin>>info[i]>>st[i]>>dr[i]; ^ inordine.cpp: In function 'int radacina()': inordine.cpp:16:11: error: 'NN' was not declared in this scope int v[NN]; ^ inordine.cpp:18:9: error: 'v' was not declared in this scope v[i]=0; ^ inordine.cpp:21:12: error: 'st' was not declared in this scope if(st[i]!=0) ^ inordine.cpp:22:9: error: 'v' was not declared in this scope v[st[i]=1; ^ inordine.cpp:22:18: error: expected ']' before ';' token v[st[i]=1; ^ inordine.cpp:23:12: error: 'dr' was not declared in this scope if(dr[i]!=0) ^ inordine.cpp:24:17: error: 'v' was not declared in this scope v[dr[i]=1; ^ inordine.cpp:24:26: error: expected ']' before ';' token v[dr[i]=1; ^ inordine.cpp:26:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ inordine.cpp:27:12: error: 'v' was not declared in this scope if(v[i]==0) ^ inordine.cpp: In function 'void inordine(int)': inordine.cpp:34:22: error: 'st' was not declared in this scope inordine(st[x]); ^ inordine.cpp:35:19: error: 'info' was not declared in this scope fout<<info[x]<<" "; ^ inordine.cpp:36:22: 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ă.