#652
Se dă vectorul de tați al unui arbore cu rădăcină cu n noduri și k noduri distincte din arbore. Afișați fiii fiecăruia dintre cele k noduri.
| Problema | AfisareFii | Operații I/O |
afisarefii.in/afisarefii.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64290713 | Utilizator | |
| Fișier | afisarefii.cpp | Dimensiune | 420 B |
| Data încărcării | 28 Aprilie 2026, 10:51 | Scor/rezultat | 100 puncte |
afisarefii.cpp: In function ‘int main()’: afisarefii.cpp:9:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 9 | for(int i=1; i<=n; i++) | ^~~ afisarefii.cpp:10:15: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 10 | f>>t[i]; f>>k; | ^ afisarefii.cpp:13:6: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 13 | if(t[i]==x) c++; g<<c<<" "; | ^~ afisarefii.cpp:13:23: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 13 | if(t[i]==x) c++; g<<c<<" "; | ^ afisarefii.cpp:12:14: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 12 | {f>>x; c=0; for(int i=1; i<=n; i++) | ^~~ afisarefii.cpp:13:23: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 13 | if(t[i]==x) c++; g<<c<<" "; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 40 | 40 | ||
| 3 | 0.001 secunde | OK. | 40 | 40 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema AfisareFii 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ă.