#284
Interclasare3
Se dau două şiruri, cu n
, respectiv m
, elemente, numere naturale. Primul şir este ordonat crescător, iar al doilea element este ordonat descrescător. Să se afişeze, în ordine crescătoare, valorile pare din cele două şiruri.
Problema | Interclasare3 | Operații I/O |
![]() interclasare3.in /interclasare3.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51284061 | Utilizator | |
Fișier | interclasare3.cpp | Dimensiune | 1.17 KB |
Data încărcării | 04 Iunie 2024, 09:19 | Scor / rezultat | Eroare de compilare |
interclasare3.cpp:4:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("interclasare3.in"); ^ interclasare3.cpp:5:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("interclasare3.out"); ^ interclasare3.cpp: In function 'int main()': interclasare3.cpp:12:5: error: reference to 'cin' is ambiguous cin>>n; ^ interclasare3.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("interclasare3.in"); ^ In file included from interclasare3.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ interclasare3.cpp:14:9: error: reference to 'cin' is ambiguous cin>>a[i]; ^ interclasare3.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("interclasare3.in"); ^ In file included from interclasare3.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ interclasare3.cpp:16:9: error: reference to 'cin' is ambiguous cin>>b[i]; ^ interclasare3.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("interclasare3.in"); ^ In file included from interclasare3.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ interclasare3.cpp:24:17: error: reference to 'cout' is ambiguous cout<<a[i]<<" "; ^ interclasare3.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("interclasare3.out"); ^ In file included from interclasare3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ interclasare3.cpp:27:21: error: reference to 'cout' is ambiguous cout<<"\n"; ^ interclasare3.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("interclasare3.out"); ^ In file included from interclasare3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ interclasare3.cpp:35:17: error: reference to 'cout' is ambiguous cout<<b[j]<<" "; ^ interclasare3.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("interclasare3.out"); ^ In file included from interclasare3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ interclasare3.cpp:38:21: error: reference to 'cout' is ambiguous cout<<"\n"; ^ interclasare3.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("interclasare3.out"); ^ In file included from interclasare3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ interclasare3.cpp:46:13: error: reference to 'cout' is ambiguous cout<<a[i]<<" "; ^ interclasare3.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("interclasare3.out"); ^ In file included from interclasare3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ interclasare3.cpp:49:17: error: reference to 'cout' is ambiguous cout<<"\n"; ^ interclasare3.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("interclasare3.out"); ^ In file included from interclasare3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ interclasare3.cpp:57:13: error: reference to 'cout' is ambiguous cout<<b[j]<<" "; ^ interclasare3.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("interclasare3.out"); ^ In file included from interclasare3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ interclasare3.cpp:60:17: error: reference to 'cout' is ambiguous cout<<"\n"; ^ interclasare3.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("interclasare3.out"); ^ In file included from interclasare3.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 Interclasare3 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ă.