#241
Se dau două şiruri a
şi b
, cu n
, respectiv m
elemente, numere naturale, ordonate crescător. Să se construiască un al treilea şir, c
, care să conţină, în ordine crescătoare, elementele din şirurile a
şi b
.
Problema | Interclasare | Operații I/O |
![]() interclasare.in /interclasare.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 32 MB
|
Id soluție | #58390050 | Utilizator | |
Fișier | interclasare.cpp | Dimensiune | 994 B |
Data încărcării | 31 Mai 2025, 15:17 | Scor / rezultat | Eroare de compilare |
interclasare.cpp:3:13: error: variable 'std::ifstream fin' has initializer but incomplete type ifstream fin("interclasare.in") ^ interclasare.cpp:4:1: error: expected ',' or ';' before 'ofstream' ofstream fout("interclasare.out") ^ interclasare.cpp: In function 'int main()': interclasare.cpp:8:10: error: 'n' was not declared in this scope fin>>n; ^ interclasare.cpp:9:9: error: 'i' was not declared in this scope for(i=1; i<=n; i++) ^ interclasare.cpp:10:14: error: 'a' was not declared in this scope fin>>a[i]; ^ interclasare.cpp:11:10: error: 'm' was not declared in this scope fin>>m; ^ interclasare.cpp:12:9: error: 'j' was not declared in this scope for(j=1; j<=m; j++) ^ interclasare.cpp:13:14: error: 'b' was not declared in this scope fin>>b[j]; ^ interclasare.cpp:14:5: error: 'i' was not declared in this scope i=1; ^ interclasare.cpp:15:5: error: 'j' was not declared in this scope j=1; ^ interclasare.cpp:18:12: error: 'a' was not declared in this scope if(a[i]<b[j]) ^ interclasare.cpp:18:17: error: 'b' was not declared in this scope if(a[i]<b[j]) ^ interclasare.cpp:20:13: error: 'k' was not declared in this scope k++; ^ interclasare.cpp:21:13: error: 'c' was not declared in this scope c[k]=a[i]; ^ interclasare.cpp:26:13: error: 'k' was not declared in this scope k++; ^ interclasare.cpp:27:13: error: 'c' was not declared in this scope c[k]=b[j]; ^ interclasare.cpp:32:13: error: 'k' was not declared in this scope k++; ^ interclasare.cpp:33:13: error: 'c' was not declared in this scope c[k]=a[i]; ^ interclasare.cpp:42:9: error: 'k' was not declared in this scope k++; ^ interclasare.cpp:43:9: error: 'c' was not declared in this scope c[k]=a[i]; ^ interclasare.cpp:43:14: error: 'a' was not declared in this scope c[k]=a[i]; ^ interclasare.cpp:48:9: error: 'k' was not declared in this scope k++; ^ interclasare.cpp:49:9: error: 'c' was not declared in this scope c[k]=b[j]; ^ interclasare.cpp:49:14: error: 'b' was not declared in this scope c[k]=b[j]; ^ interclasare.cpp:52:17: error: 'k' was not declared in this scope for(i=1; i<=k; i++) ^ interclasare.cpp:54:9: error: 'fout' was not declared in this scope fout<<c[i]<<" "; ^ interclasare.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 Interclasare 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ă.