#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 | #53992925 | Utilizator | |
Fișier | interclasare1.cpp | Dimensiune | 1.03 KB |
Data încărcării | 17 Noiembrie 2024, 11:11 | Scor / rezultat | Eroare de compilare |
interclasare1.cpp:5:1: error: expected ',' or ';' before 'ofstream' ofstream fout ("interclasare1.out") ^ interclasare1.cpp: In function 'int main()': interclasare1.cpp:9:10: error: 'n' was not declared in this scope fin>>n;//citire ^ interclasare1.cpp:10:9: error: 'i' was not declared in this scope for(i=1; i<=n; i++) ^ interclasare1.cpp:12:14: error: 'a' was not declared in this scope fin>>a[i]; ^ interclasare1.cpp:14:10: error: 'm' was not declared in this scope fin>>m; ^ interclasare1.cpp:15:9: error: 'j' was not declared in this scope for(j=1; j<=m; j++) ^ interclasare1.cpp:17:14: error: 'b' was not declared in this scope fin>>b[j]; ^ interclasare1.cpp:19:5: error: 'j' was not declared in this scope j=1; ^ interclasare1.cpp:20:5: error: 'i' was not declared in this scope i=1; ^ interclasare1.cpp:23:12: error: 'a' was not declared in this scope if(a[i]<=b[j] && a[i]!=c[k]) ^ interclasare1.cpp:23:18: error: 'b' was not declared in this scope if(a[i]<=b[j] && a[i]!=c[k]) ^ interclasare1.cpp:23:32: error: 'c' was not declared in this scope if(a[i]<=b[j] && a[i]!=c[k]) ^ interclasare1.cpp:23:34: error: 'k' was not declared in this scope if(a[i]<=b[j] && a[i]!=c[k]) ^ interclasare1.cpp:44:9: error: 'c' was not declared in this scope c[++k]=a[i]; ^ interclasare1.cpp:44:13: error: 'k' was not declared in this scope c[++k]=a[i]; ^ interclasare1.cpp:44:16: error: 'a' was not declared in this scope c[++k]=a[i]; ^ interclasare1.cpp:49:9: error: 'c' was not declared in this scope c[++k]=b[j]; ^ interclasare1.cpp:49:13: error: 'k' was not declared in this scope c[++k]=b[j]; ^ interclasare1.cpp:49:16: error: 'b' was not declared in this scope c[++k]=b[j]; ^ interclasare1.cpp:52:16: error: 'k' was not declared in this scope for(i=1;i<=k;i++) ^ interclasare1.cpp:54:9: error: 'fout' was not declared in this scope fout<<c[i]<<" "; ^ interclasare1.cpp:54:15: error: 'c' was not declared in this scope fout<<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ă.