#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 | #51652292 | Utilizator | |
Fișier | interclasare1.cpp | Dimensiune | 823 B |
Data încărcării | 28 Iulie 2024, 15:46 | Scor / rezultat | Eroare de compilare |
interclasare1.cpp:9:10: warning: character constant too long for its type [enabled by default] int a[100'001], b[100'001], c[200'002]; ^ interclasare1.cpp:9:34: warning: missing terminating ' character [enabled by default] int a[100'001], b[100'001], c[200'002]; ^ interclasare1.cpp:9:1: error: missing terminating ' character int a[100'001], b[100'001], c[200'002]; ^ interclasare1.cpp:9:10: error: expected ']' before '\x5b313030' int a[100'001], b[100'001], c[200'002]; ^ interclasare1.cpp: In function 'int main()': interclasare1.cpp:13:12: error: 'n' was not declared in this scope cin >> n; ^ interclasare1.cpp:14:40: error: 'a' was not declared in this scope for(int i = 1; i <= n; i++) cin >> a[i]; ^ interclasare1.cpp:15:12: error: 'm' was not declared in this scope cin >> m; ^ interclasare1.cpp:16:40: error: 'b' was not declared in this scope for(int i = 1; i <= m; i++) cin >> b[i]; ^ interclasare1.cpp:20:12: error: 'a' was not declared in this scope if(a[i] < b[j]) { ^ interclasare1.cpp:20:19: error: 'b' was not declared in this scope if(a[i] < b[j]) { ^ interclasare1.cpp:21:13: error: 'c' was not declared in this scope c[++k] = a[i++]; ^ interclasare1.cpp:23:12: error: 'a' was not declared in this scope if(a[i] == b[j]) { ^ interclasare1.cpp:23:20: error: 'b' was not declared in this scope if(a[i] == b[j]) { ^ interclasare1.cpp:24:13: error: 'c' was not declared in this scope c[++k] = a[i++]; ^ interclasare1.cpp:27:12: error: 'a' was not declared in this scope if(a[i] > b[j]) { ^ interclasare1.cpp:27:19: error: 'b' was not declared in this scope if(a[i] > b[j]) { ^ interclasare1.cpp:28:13: error: 'c' was not declared in this scope c[++k] = b[j++]; ^ interclasare1.cpp:31:19: error: 'c' was not declared in this scope while(i <= n) c[++k] = a[i++]; ^ interclasare1.cpp:31:28: error: 'a' was not declared in this scope while(i <= n) c[++k] = a[i++]; ^ interclasare1.cpp:32:19: error: 'c' was not declared in this scope while(j <= m) c[++k] = b[j++]; ^ interclasare1.cpp:32:28: error: 'b' was not declared in this scope while(j <= m) c[++k] = b[j++]; ^ interclasare1.cpp:34:17: error: 'c' was not declared in this scope cout << 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ă.