#652
AfisareFii
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 | #4883384 | Utilizator | |
Fișier | afisarefii.cpp | Dimensiune | 540 B |
Data încărcării | 03 Aprilie 2017, 08:51 | Scor / rezultat | Eroare de compilare |
afisarefii.cpp:6:1: error: expected ')' before 'int' int n, r, T[100], a[100][100], p[100]; ^ afisarefii.cpp:6:8: error: 'r' was not declared in this scope int n, r, T[100], a[100][100], p[100]; ^ afisarefii.cpp:6:11: error: 'T' was not declared in this scope int n, r, T[100], a[100][100], p[100]; ^ afisarefii.cpp:6:19: error: 'a' was not declared in this scope int n, r, T[100], a[100][100], p[100]; ^ afisarefii.cpp:6:32: error: 'p' was not declared in this scope int n, r, T[100], a[100][100], p[100]; ^ afisarefii.cpp: In function 'void citire()': afisarefii.cpp:10:5: error: 'n' was not declared in this scope in>>n>>r; ^ afisarefii.cpp:10:8: error: 'r' was not declared in this scope in>>n>>r; ^ afisarefii.cpp:13:1: error: 'a' was not declared in this scope a[x][y]=a[y][x]=1;; ^ afisarefii.cpp: In function 'void complet(int)': afisarefii.cpp:20:9: error: 'p' was not declared in this scope x[1]=r; p[r]=1; ^ afisarefii.cpp:22:14: error: 'n' was not declared in this scope { for(i=1;i<=n;i++) ^ afisarefii.cpp:23:4: error: 'a' was not declared in this scope if(a[x[s]][i] &&!p[i]) ^ afisarefii.cpp:25:9: error: 'T' was not declared in this scope p[i]=1; T[i]=x[s]; ^ afisarefii.cpp: In function 'int main()': afisarefii.cpp:34:9: error: 'r' was not declared in this scope complet(r); ^ afisarefii.cpp:35:12: error: 'n' was not declared in this scope for(i=1;i<=n;i++) out<<T[i]<<" "; ^ afisarefii.cpp:35:24: error: 'T' was not declared in this scope for(i=1;i<=n;i++) out<<T[i]<<" "; ^
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ă.