#4386
Se dă un vector cu n elemente numere naturale. Să se transforme vectorul, duplicând fiecare apariție a valorii minime.
| Problema | inserare3 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64209109 | Utilizator | |
| Fișier | inserare3.cpp | Dimensiune | 424 B |
| Data încărcării | 23 Aprilie 2026, 08:46 | Scor/rezultat | Eroare de compilare |
inserare3.cpp: In function ‘int main()’: inserare3.cpp:6:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 6 | for (i=0;i<n;i++) | ^~~ inserare3.cpp:8:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 8 | minn=v[i]; | ^~~~ inserare3.cpp:14:10: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 14 | {for (j=n-1;j>i;j--) | ^~~ inserare3.cpp:16:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 16 | v[i+1]=v[i]; | ^ inserare3.cpp:18:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 18 | for (i=0;i<n;i++) | ^~~ inserare3.cpp:20:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 20 | return 0; | ^~~~~~ inserare3.cpp:20:14: error: expected ‘}’ at end of input 20 | return 0; | ^ inserare3.cpp:4:1: note: to match this ‘{’ 4 | {int v[1500],n,i,j,minn=0; | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema inserare3 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ă.