#242
Se dă un număr natural x și două șiruri a și b, cu n, respectiv m elemente, numere naturale, ordonate strict crescător. Să se afișeze, în ordine crescătoare, multiplii lui x care se află doar în unul dintre cele două șiruri.
Variante Bacalaureat 2009
| Problema | InterclasM | Operații I/O |
interclasm.in/interclasm.out
|
|---|---|---|---|
| Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64731084 | Utilizator | |
| Fișier | interclasm.cpp | Dimensiune | 1.01 KB |
| Data încărcării | 26 Mai 2026, 15:32 | Scor/rezultat | 100 puncte |
interclasm.cpp: In function ‘int main()’: interclasm.cpp:12:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 12 | for(int i = 1;i <= n;i++) | ^~~ interclasm.cpp:14:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 14 | fin>>m; | ^~~ interclasm.cpp:26:13: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 26 | if(a[i]%x==0) | ^~ interclasm.cpp:28:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 28 | i++; | ^ interclasm.cpp:32:17: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 32 | if(b[j]%x==0) | ^~ interclasm.cpp:34:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 34 | j++; | ^ interclasm.cpp:41:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 41 | if(a[i] % x == 0 && a[i-1] != a[i]) | ^~ interclasm.cpp:43:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 43 | i++; | ^ interclasm.cpp:47:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 47 | if(b[j] % x == 0 && b[j-1] != b[j]) | ^~ interclasm.cpp:49:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 49 | j++; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.003 secunde | OK. | 30 | 30 | ||
| 3 | 0.018 secunde | OK. | 50 | 50 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema InterclasM 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ă.