#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 | #64657237 | Utilizator | |
| Fișier | interclasare3.cpp | Dimensiune | 1.01 KB |
| Data încărcării | 20 Mai 2026, 21:57 | Scor/rezultat | Eroare de compilare |
interclasare3.cpp: In function ‘int main()’: interclasare3.cpp:8:5: error: expected ‘,’ or ‘;’ before ‘int’ 8 | int a[101], b[101], c[101], i, j, k, n, m, maxi; | ^~~ interclasare3.cpp:9:10: error: ‘n’ was not declared in this scope 9 | fin>>n; | ^ interclasare3.cpp:10:10: error: ‘i’ was not declared in this scope 10 | for (i=1; i<=n; i++) | ^ interclasare3.cpp:11:10: error: ‘a’ was not declared in this scope 11 | fin>>a[i]; | ^ interclasare3.cpp:12:10: error: ‘j’ was not declared in this scope 12 | for (j=1; j<=n; j++) | ^ interclasare3.cpp:14:10: error: ‘b’ was not declared in this scope 14 | fin>>b[j]; | ^ interclasare3.cpp:15:5: error: ‘maxi’ was not declared in this scope 15 | maxi=j; | ^~~~ interclasare3.cpp:17:5: error: ‘i’ was not declared in this scope 17 | i=1; j=maxi; k=1; | ^ interclasare3.cpp:17:10: error: ‘j’ was not declared in this scope 17 | i=1; j=maxi; k=1; | ^ interclasare3.cpp:17:12: error: ‘maxi’ was not declared in this scope 17 | i=1; j=maxi; k=1; | ^~~~ interclasare3.cpp:17:18: error: ‘k’ was not declared in this scope 17 | i=1; j=maxi; k=1; | ^ interclasare3.cpp:18:16: error: expected ‘)’ before ‘;’ token 18 | while (i<=n; j<=m) | ~ ^ | ) interclasare3.cpp:18:5: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation] 18 | while (i<=n; j<=m) | ^~~~~ interclasare3.cpp:18:18: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘while’ 18 | while (i<=n; j<=m) | ^ interclasare3.cpp:18:21: error: ‘m’ was not declared in this scope; did you mean ‘tm’? 18 | while (i<=n; j<=m) | ^ | tm interclasare3.cpp:40:9: error: ‘c’ was not declared in this scope 40 | c[k]=a[i]; | ^ interclasare3.cpp:40:14: error: ‘a’ was not declared in this scope 40 | c[k]=a[i]; | ^ interclasare3.cpp:49:9: error: ‘c’ was not declared in this scope 49 | c[k]=b[j]; | ^ interclasare3.cpp:49:14: error: ‘b’ was not declared in this scope 49 | c[k]=b[j]; | ^ interclasare3.cpp:56:11: error: ‘c’ was not declared in this scope 56 | fout<<c[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ă.