#675
BiFrunze
Se dă un arbore binar care conține valori numere naturale. Să se afișeze frunzele acestui arbore.
Problema | BiFrunze | Operații I/O |
bifrunze.in /bifrunze.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #36274085 | Utilizator | |
Fișier | bifrunze.cpp | Dimensiune | 534 B |
Data încărcării | 12 Aprilie 2022, 22:37 | Scor / rezultat | Eroare de compilare |
bifrunze.cpp:8:1: error: expected ',' or ';' before 'int' int n, fr[1001], i, x, st, dr, f, rad, j; ^ bifrunze.cpp: In function 'int main()': bifrunze.cpp:12:12: error: 'n' was not declared in this scope fin >> n; ^ bifrunze.cpp:13:9: error: 'i' was not declared in this scope for(i = 1; i <= n; i++) ^ bifrunze.cpp:15:16: error: 'x' was not declared in this scope fin >> x >> st >> dr; ^ bifrunze.cpp:15:21: error: 'st' was not declared in this scope fin >> x >> st >> dr; ^ bifrunze.cpp:15:27: error: 'dr' was not declared in this scope fin >> x >> st >> dr; ^ bifrunze.cpp:16:9: error: 'fr' was not declared in this scope fr[st] = fr[dr] = 1; ^ bifrunze.cpp:18:13: error: 'f' was not declared in this scope f++; ^ bifrunze.cpp:20:9: error: 'i' was not declared in this scope for(i = 1; i <= n; i++) ^ bifrunze.cpp:21:12: error: 'fr' was not declared in this scope if(fr[i] == 0) rad = i; ^ bifrunze.cpp:21:24: error: 'rad' was not declared in this scope if(fr[i] == 0) rad = i; ^ bifrunze.cpp:22:8: error: 'rad' was not declared in this scope if(rad < n-f) j = n-f+1; ^ bifrunze.cpp:22:16: error: 'f' was not declared in this scope if(rad < n-f) j = n-f+1; ^ bifrunze.cpp:22:19: error: 'j' was not declared in this scope if(rad < n-f) j = n-f+1; ^ bifrunze.cpp:23:10: error: 'j' was not declared in this scope else j = n-f; ^ bifrunze.cpp:24:9: error: 'i' was not declared in this scope for(i = j; i <= n; i++) ^ bifrunze.cpp:24:13: error: 'j' was not declared in this scope for(i = j; i <= n; i++) ^ bifrunze.cpp:25:17: error: 'rad' was not declared in this scope if(i != rad) fout << i << " "; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema BiFrunze 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ă.