#530
Multimi1
Se dau două mulțimi de numere naturale. Să se afișeze reuniunea și intersecția lor.
Problema | Multimi1 | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #48682606 | Utilizator | |
Fișier | multimi1.cpp | Dimensiune | 898 B |
Data încărcării | 01 Februarie 2024, 20:57 | Scor / rezultat | Eroare de compilare |
multimi1.cpp:4:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("interclasare3.in"); ^ multimi1.cpp:5:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("interclasare3.out"); ^ multimi1.cpp: In function 'int main()': multimi1.cpp:9:5: error: reference to 'cin' is ambiguous cin>>n; ^ multimi1.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("interclasare3.in"); ^ In file included from multimi1.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ multimi1.cpp:10:25: error: reference to 'cin' is ambiguous for(i=1; i<=n; i++) cin>>a[i]; ^ multimi1.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("interclasare3.in"); ^ In file included from multimi1.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ multimi1.cpp:11:5: error: reference to 'cin' is ambiguous cin>>m; ^ multimi1.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("interclasare3.in"); ^ In file included from multimi1.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ multimi1.cpp:12:26: error: reference to 'cin' is ambiguous for (i=1; i<=m; i++) cin>>b[i]; ^ multimi1.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("interclasare3.in"); ^ In file included from multimi1.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ multimi1.cpp:28:25: error: reference to 'cout' is ambiguous for(i=1; i<=p; i++) cout<<c[i]<<" "; ^ multimi1.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("interclasare3.out"); ^ In file included from multimi1.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ multimi1.cpp:31:5: error: reference to 'cout' is ambiguous cout<<'\n'; ^ multimi1.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("interclasare3.out"); ^ In file included from multimi1.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ multimi1.cpp:45:25: error: reference to 'cout' is ambiguous for(i=1; i<=p; i++) cout<<c[i]<<" "; ^ multimi1.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("interclasare3.out"); ^ In file included from multimi1.cpp:1:0: /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 Multimi1 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ă.