#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 | #54542154 | Utilizator | |
Fișier | interclasare1.cpp | Dimensiune | 799 B |
Data încărcării | 02 Decembrie 2024, 09:20 | Scor / rezultat | Eroare de compilare |
interclasare1.cpp: In function 'int main()': interclasare1.cpp:6:5: error: expected ',' or ';' before 'ofstream' ofstream out("interclasare1.out") ^ interclasare1.cpp:8:5: error: 'cin' was not declared in this scope cin>>n; ^ interclasare1.cpp:8:10: error: 'n' was not declared in this scope cin>>n; ^ interclasare1.cpp:10:13: error: 'a' was not declared in this scope in>>a[i]; ^ interclasare1.cpp:11:10: error: 'm' was not declared in this scope cin>>m; ^ interclasare1.cpp:13:13: error: 'b' was not declared in this scope in>>b[i]; ^ interclasare1.cpp:14:5: error: 'i' was not declared in this scope i=j=1; ^ interclasare1.cpp:14:7: error: 'j' was not declared in this scope i=j=1; ^ interclasare1.cpp:16:12: error: 'c' was not declared in this scope if(c<=10) ^ interclasare1.cpp:17:12: error: 'a' was not declared in this scope if(a[i]<b[j]) ^ interclasare1.cpp:17:17: error: 'b' was not declared in this scope if(a[i]<b[j]) ^ interclasare1.cpp:19:13: error: 'out' was not declared in this scope out<<a[i]<<" ";i++;c++; ^ interclasare1.cpp:24:13: error: 'out' was not declared in this scope out<<b[j]<<" ";j++;c++; ^ interclasare1.cpp:28:9: error: 'out' was not declared in this scope out<<b[j]<<" ";i++;j++;c++; ^ interclasare1.cpp:31:6: error: 'cout' was not declared in this scope {cout<<endl;c=0} ^ interclasare1.cpp:31:20: error: expected ';' before '}' token {cout<<endl;c=0} ^ interclasare1.cpp:34:9: error: 'out' was not declared in this scope out<<a[i]<<" "; ^ interclasare1.cpp:34:14: error: 'a' was not declared in this scope out<<a[i]<<" "; ^ interclasare1.cpp:35:13: error: 'c' was not declared in this scope i++;c++; ^ interclasare1.cpp:39:9: error: 'out' was not declared in this scope out<<b[j]<<" "; ^ interclasare1.cpp:39:14: error: 'b' was not declared in this scope out<<b[j]<<" "; ^ interclasare1.cpp:40:13: error: 'c' was not declared in this scope j++;c++; ^
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ă.