#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 | #53652039 | Utilizator | |
Fișier | afisarefii.cpp | Dimensiune | 785 B |
Data încărcării | 07 Noiembrie 2024, 12:38 | Scor / rezultat | Eroare de compilare |
afisarefii.cpp:34:25: warning: missing terminating ' character [enabled by default] cout << '\n'' ^ afisarefii.cpp:34:13: error: missing terminating ' character cout << '\n'' ^ afisarefii.cpp: In function 'int main()': afisarefii.cpp:10:5: error: reference to 'cin' is ambiguous cin >> n; ^ afisarefii.cpp:5:10: note: candidates are: std::ifstream cin ifstream cin("afisarefii.in"); ^ In file included from afisarefii.cpp:2:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ afisarefii.cpp:11:14: error: expected unqualified-id before numeric constant for (int 1 = 1; i <= n; i++) ^ afisarefii.cpp:11:14: error: expected ';' before numeric constant afisarefii.cpp:11:16: error: lvalue required as left operand of assignment for (int 1 = 1; i <= n; i++) ^ afisarefii.cpp:11:21: error: 'i' was not declared in this scope for (int 1 = 1; i <= n; i++) ^ afisarefii.cpp:11:27: error: expected ')' before ';' token for (int 1 = 1; i <= n; i++) ^ afisarefii.cpp:11:29: error: 'i' was not declared in this scope for (int 1 = 1; i <= n; i++) ^ afisarefii.cpp:11:32: error: expected ';' before ')' token for (int 1 = 1; i <= n; i++) ^ afisarefii.cpp:16:5: error: reference to 'cin' is ambiguous cin >> k; ^ afisarefii.cpp:5:10: note: candidates are: std::ifstream cin ifstream cin("afisarefii.in"); ^ In file included from afisarefii.cpp:2:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ afisarefii.cpp:19:9: error: reference to 'cin' is ambiguous cin >> k; ^ afisarefii.cpp:5:10: note: candidates are: std::ifstream cin ifstream cin("afisarefii.in"); ^ In file included from afisarefii.cpp:2:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ afisarefii.cpp:22:13: error: reference to 'cin' is ambiguous cin >> v; ^ afisarefii.cpp:5:10: note: candidates are: std::ifstream cin ifstream cin("afisarefii.in"); ^ In file included from afisarefii.cpp:2:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ afisarefii.cpp:23:13: error: reference to 'cout' is ambiguous cout << x[v] << ' '; ^ afisarefii.cpp:6:10: note: candidates are: std::ofstream cout ofstream cout("afisarefii.out"); ^ In file included from afisarefii.cpp:2:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ afisarefii.cpp:30:25: error: reference to 'cout' is ambiguous cout << i << ' '; ^ afisarefii.cpp:6:10: note: candidates are: std::ofstream cout ofstream cout("afisarefii.out"); ^ In file included from afisarefii.cpp:2:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ afisarefii.cpp:34:13: error: reference to 'cout' is ambiguous cout << '\n'' ^ afisarefii.cpp:6:10: note: candidates are: std::ofstream cout ofstream cout("afisarefii.out"); ^ In file included from afisarefii.cpp:2:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ afisarefii.cpp:35:9: error: expected ';' before '}' token } ^
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ă.