#672
Se dă un arbore binar care conține valori numere naturale. Să se afișeze valorile din arbore în urma parcurgerii în postordine.
Problema | Postordine | Operații I/O |
![]() postordine.in /postordine.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #16167193 | Utilizator | |
Fișier | postordine.cpp | Dimensiune | 1018 B |
Data încărcării | 09 Iunie 2019, 21:45 | Scor / rezultat | 0 puncte |
postordine.cpp: In function 'void dfs(int)': postordine.cpp:18:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=0;i<a[start_node].size();i++) ^ postordine.cpp: In function 'int main()': postordine.cpp:28:41: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen("postordine.in", "r", stdin); ^ postordine.cpp:29:43: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] freopen("postordine.out", "w", stdout); ^ postordine.cpp:32:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &n); ^ postordine.cpp:36:36: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d%d", &x, &y, &z); ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
2 | 0 secunde | Raspuns gresit. | 40 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 40 | 0 | ||
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Postordine 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ă.