#284
Se dau două şiruri, cu n, respectiv m, elemente, numere naturale. Primul şir este ordonat crescător, iar al doilea element este ordonat descrescător. Să se afişeze, în ordine crescătoare, valorile pare din cele două şiruri.
| Problema | Interclasare3 | Operații I/O |
interclasare3.in/interclasare3.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64730625 | Utilizator | |
| Fișier | interclasare3.cpp | Dimensiune | 801 B |
| Data încărcării | 26 Mai 2026, 14:47 | Scor/rezultat | Eroare de compilare |
interclasare3.cpp: In function ‘int main()’: interclasare3.cpp:8:6: error: ‘n’ was not declared in this scope 8 | fin>>n; | ^ interclasare3.cpp:9:1: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 9 | for(i=1;i<=n;i++) | ^~~ interclasare3.cpp:11:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 11 | fin>>m; | ^~~ interclasare3.cpp:11:14: error: ‘m’ was not declared in this scope 11 | fin>>m; | ^ interclasare3.cpp:12:1: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 12 | for(i=1;i<=m;i++) | ^~~ interclasare3.cpp:14:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 14 | i=1; | ^ interclasare3.cpp:21:9: error: ‘c’ was not declared in this scope 21 | c[k]=a[i];} | ^ interclasare3.cpp:28:9: error: ‘c’ was not declared in this scope 28 | c[k]=b[i];} | ^ interclasare3.cpp:35:5: error: ‘c’ was not declared in this scope 35 | c[k]=a[i];} | ^ interclasare3.cpp:39:11: error: expected primary-expression before ‘%’ token 39 | {if(j)%2==0) | ^ interclasare3.cpp:47:11: error: ‘v’ was not declared in this scope 47 | fout<<v[i]<<" "; | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Interclasare3 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ă.