#752
BiArbore
Se consideră un arbore binar alocat dinamic în care nodurile memorează numere naturale nenule. Să se determine valorile memorate în descendenții direcți ai rădăcinii arborelui.
Problema | BiArbore | Operații I/O |
biarbore.in /biarbore.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #29099866 | Utilizator | |
Fișier | biarbore.cpp | Dimensiune | 829 B |
Data încărcării | 31 Martie 2021, 10:29 | Scor / rezultat | Eroare de compilare |
biarbore.cpp:1:10: error: #include expects "FILENAME" or <FILENAME> #include <iostream> ^ biarbore.cpp:2:10: error: #include expects "FILENAME" or <FILENAME> #include <fstream> ^ biarbore.cpp:35:20: error: stray '#' in program g<<1<<' '; ^ biarbore.cpp:35:26: error: stray '#' in program g<<1<<' '; ^ biarbore.cpp:49:20: error: stray '#' in program g<<s<<' ';q++; ^ biarbore.cpp:49:26: error: stray '#' in program g<<s<<' ';q++; ^ biarbore.cpp:4:1: error: 'ifstream' does not name a type ifstream f("nivelebin.in"); ^ biarbore.cpp:4:18: error: 'nivelebin' does not name a type ifstream f("nivelebin.in"); ^ biarbore.cpp:4:36: error: expected unqualified-id before ')' token ifstream f("nivelebin.in"); ^ biarbore.cpp:5:1: error: 'ofstream' does not name a type ofstream g("nivelebin.out"); ^ biarbore.cpp:5:18: error: 'nivelebin' does not name a type ofstream g("nivelebin.out"); ^ biarbore.cpp:5:37: error: expected unqualified-id before ')' token ofstream g("nivelebin.out"); ^ biarbore.cpp: In function 'int main()': biarbore.cpp:9:1: error: 'f' was not declared in this scope f>>n; i=0; ^ biarbore.cpp:9:3: error: 'gt' was not declared in this scope f>>n; i=0; ^ biarbore.cpp:9:11: warning: statement has no effect [-Wunused-value] f>>n; i=0; ^ biarbore.cpp:10:11: error: expected ')' before ';' token while(f>>nr>>st>>dr) ^ biarbore.cpp:10:38: error: expected ';' before ')' token while(f>>nr>>st>>dr) ^ biarbore.cpp:14:1: warning: statement has no effect [-Wunused-value] } ^ biarbore.cpp:19:11: error: 'lt' was not declared in this scope for(i=1;i<=n;i++) ^ biarbore.cpp:19:14: error: expected primary-expression before '=' token for(i=1;i<=n;i++) ^ biarbore.cpp:19:16: error: expected ')' before ';' token for(i=1;i<=n;i++) ^ biarbore.cpp:19:20: error: expected ';' before ')' token for(i=1;i<=n;i++) ^ biarbore.cpp:8:37: warning: unused variable 'p' [-Wunused-variable] { int n,i,j,tati[1001]={0},nr,st,dr,p; ^ biarbore.cpp:16:5: warning: unused variable 'cont' [-Wunused-variable] int cont; ^ biarbore.cpp:17:23: warning: unused variable 'rad' [-Wunused-variable] while(tati[j])j++;int rad=j; ^ biarbore.cpp:18:5: warning: unused variable 'maxx' [-Wunused-variable] int maxx=0; ^ biarbore.cpp:52:1: error: expected '}' at end of input } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema BiArbore 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ă.