#774
Se dă o matrice cu n linii şi m coloane şi elemente numere naturale. Să se elimine din matrice toate liniile care încep cu un număr prim și apoi să se afișeze matricea.
| Problema | ElimLinii | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64565588 | Utilizator | |
| Fișier | elimlinii.cpp | Dimensiune | 559 B |
| Data încărcării | 14 Mai 2026, 15:56 | Scor/rezultat | 100 puncte |
elimlinii.cpp: In function ‘int main()’: elimlinii.cpp:14:6: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 14 | for (p=2;p<a[i][0];p++) | ^~~ elimlinii.cpp:17:8: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 17 | if (d==0 && a[i][0]!=0&&a[i][0]!=1 ) | ^~ elimlinii.cpp:19:7: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 19 | for (j=0;j<m;j++) | ^~~ elimlinii.cpp:21:8: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 21 | n--; | ^ elimlinii.cpp:25:6: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 25 | { for (j=0;j<m;j++) | ^~~ elimlinii.cpp:27:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 27 | cout<<endl;} | ^~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.002 secunde | OK. | 40 | 40 | ||
| 3 | 0.004 secunde | OK. | 40 | 40 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ElimLinii 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ă.