#250
Interclasare1
Se dau două şiruri a
şi b
, cu n
, respectiv m
elemente, numere naturale, ordonate strict crescător. Să se afişeze, în ordine strict crescătoare, valorile existente în cel puţin unul dintre cele două şiruri.
Variante Bacalaureat 2009
Problema | Interclasare1 | Operații I/O |
interclasare1.in /interclasare1.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #22802708 | Utilizator | |
Fișier | interclasare1.cpp | Dimensiune | 686 B |
Data încărcării | 06 Mai 2020, 15:31 | Scor / rezultat | Eroare de compilare |
interclasare1.cpp:3:12: warning: missing terminating " character [enabled by default] ifstream f("interclasare1.in”); ^ interclasare1.cpp:3:1: error: missing terminating " character ifstream f("interclasare1.in”); ^ interclasare1.cpp:4:12: warning: missing terminating " character [enabled by default] ofstream g("interclasare1.out”); ^ interclasare1.cpp:4:1: error: missing terminating " character ofstream g("interclasare1.out”); ^ interclasare1.cpp:5:16: error: 'b' has not been declared int a[100001], b[100001], c[200001]; ^ interclasare1.cpp:5:27: error: 'c' has not been declared int a[100001], b[100001], c[200001]; ^ interclasare1.cpp:5:36: error: expected ')' before ';' token int a[100001], b[100001], c[200001]; ^ interclasare1.cpp:5:36: error: expected ')' before ';' token interclasare1.cpp: In function 'int main()': interclasare1.cpp:9:6: error: invalid operands of types 'std::ifstream(std::ofstream (*)(int*, int*, int*)) {aka std::basic_ifstream<char>(std::basic_ofstream<char> (*)(int*, int*, int*))}' and 'int' to binary 'operator>>' f >> n; ^ interclasare1.cpp:11:6: error: 'a' was not declared in this scope f >> a[i]; ^ interclasare1.cpp:12:6: error: invalid operands of types 'std::ifstream(std::ofstream (*)(int*, int*, int*)) {aka std::basic_ifstream<char>(std::basic_ofstream<char> (*)(int*, int*, int*))}' and 'int' to binary 'operator>>' f >> m; ^ interclasare1.cpp:14:6: error: 'b' was not declared in this scope f >> b[j]; ^ interclasare1.cpp:21:5: error: 'a' was not declared in this scope if (a[i] < b[j]) ^ interclasare1.cpp:21:12: error: 'b' was not declared in this scope if (a[i] < b[j]) ^ interclasare1.cpp:23:1: error: 'c' was not declared in this scope c[k] = a[i]; ^ interclasare1.cpp:29:1: error: 'c' was not declared in this scope c[k] = b[j]; ^ interclasare1.cpp:34:1: error: 'c' was not declared in this scope c[k] = a[i]; ^ interclasare1.cpp:44:1: error: 'c' was not declared in this scope c[k] = a[l]; ^ interclasare1.cpp:44:8: error: 'a' was not declared in this scope c[k] = a[l]; ^ interclasare1.cpp:52:1: error: 'c' was not declared in this scope c[k] = b[l]; ^ interclasare1.cpp:52:8: error: 'b' was not declared in this scope c[k] = b[l]; ^ interclasare1.cpp:57:1: error: 'g' was not declared in this scope g << c[i] << " "; ^ interclasare1.cpp:57:6: error: 'c' was not declared in this scope g << c[i] << " "; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Interclasare1 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ă.