#644
DetDrum2
Se dă vectorul de tați al unui arbore cu rădăcină cu n
noduri și doua noduri p q
. Determinați drumul elementar de la nodul p
la nodul q
.
Problema | DetDrum2 | Operații I/O |
![]() detdrum2.in /detdrum2.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #48897588 | Utilizator | |
Fișier | detdrum2.cpp | Dimensiune | 689 B |
Data încărcării | 08 Februarie 2024, 17:13 | Scor / rezultat | Eroare de compilare |
detdrum2.cpp: In function 'int main()': detdrum2.cpp:25:5: error: reference to 'cin' is ambiguous cin >> n >> p >> q; ^ detdrum2.cpp:6:10: note: candidates are: std::ifstream cin ifstream cin("detdrum2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from detdrum2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ detdrum2.cpp:28:9: error: reference to 'cin' is ambiguous cin >> T[i]; ^ detdrum2.cpp:6:10: note: candidates are: std::ifstream cin ifstream cin("detdrum2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from detdrum2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ detdrum2.cpp:41:9: error: reference to 'cout' is ambiguous cout << p << " "; ^ detdrum2.cpp:7:10: note: candidates are: std::ofstream cout ofstream cout("detdrum2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from detdrum2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ detdrum2.cpp:44:5: error: reference to 'cout' is ambiguous cout << p; ^ detdrum2.cpp:7:10: note: candidates are: std::ofstream cout ofstream cout("detdrum2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from detdrum2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema DetDrum2 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ă.