#3794
InterclasNoMemory1
Se dau două șiruri de numere naturale, cu n
, respectiv m
elemente, ordonate crescător. Să se determine al treilea șir, care să conţină, în ordine crescătoare, elementele din primele două şiruri.
Problema | InterclasNoMemory1 | Operații I/O |
file.in /file.out
|
---|---|---|---|
Limita timp | 0.25 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
Id soluție | #51195783 | Utilizator | |
Fișier | interclasnomemory1.cpp | Dimensiune | 713 B |
Data încărcării | 29 Mai 2024, 14:41 | Scor / rezultat | Eroare de compilare |
interclasnomemory1.cpp: In function 'void interclasare()': interclasnomemory1.cpp:11:2: error: 'ifstream' was not declared in this scope ifstream fin1("file1.txt"); ^ interclasnomemory1.cpp:11:2: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from interclasnomemory1.cpp:2: /usr/include/c++/4.8/iosfwd:157:34: note: 'std::ifstream' typedef basic_ifstream<char> ifstream; ^ interclasnomemory1.cpp:11:11: error: expected ';' before 'fin1' ifstream fin1("file1.txt"); ^ interclasnomemory1.cpp:12:11: error: expected ';' before 'fin2' ifstream fin2("file2.txt"); ^ interclasnomemory1.cpp:13:2: error: 'ofstream' was not declared in this scope ofstream fout("file.out"); ^ interclasnomemory1.cpp:13:2: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from interclasnomemory1.cpp:2: /usr/include/c++/4.8/iosfwd:160:34: note: 'std::ofstream' typedef basic_ofstream<char> ofstream; ^ interclasnomemory1.cpp:13:11: error: expected ';' before 'fout' ofstream fout("file.out"); ^ interclasnomemory1.cpp:15:2: error: 'fin1' was not declared in this scope fin1 >> n1; ^ interclasnomemory1.cpp:16:2: error: 'fin2' was not declared in this scope fin2 >> n2; ^ interclasnomemory1.cpp:28:4: error: 'fout' was not declared in this scope fout << var1 << ' '; ^ interclasnomemory1.cpp:34:4: error: 'fout' was not declared in this scope fout << var2 << ' '; ^ interclasnomemory1.cpp:42:3: error: 'fout' was not declared in this scope fout << var1 << ' '; ^ interclasnomemory1.cpp:48:3: error: 'fout' was not declared in this scope fout << var2 << ' '; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema InterclasNoMemory1 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ă.