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