#4151
Se citește un vector cu n elemente, numere naturale distincte. Să se afișeze elementele cuprinse între elementul cu valoarea minimă și cel cu valoare maximă din vector, inclusiv acestea.
| Problema | AMM | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64815072 | Utilizator | |
| Fișier | amm.cpp | Dimensiune | 578 B |
| Data încărcării | 03 Iunie 2026, 09:45 | Scor/rezultat | 100 puncte |
amm.cpp: In function ‘int main()’: amm.cpp:25:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 25 | for(i=j;i<=k;i++) | ^~~ amm.cpp:27:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 27 | cout<<'\n'; | ^~~~ amm.cpp:29:11: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 29 | else{ for(i=k;i<=j;i++) | ^~~ amm.cpp:31:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 31 | cout<<'\n'; | ^~~~ amm.cpp:7:11: warning: unused variable ‘x’ [-Wunused-variable] 7 | int n,x,v[1001],i,mx,mi,k,j; | ^ amm.cpp:24:5: warning: ‘k’ may be used uninitialized [-Wmaybe-uninitialized] 24 | if(k>j){ | ^~ amm.cpp:7:29: note: ‘k’ was declared here 7 | int n,x,v[1001],i,mx,mi,k,j; | ^ amm.cpp:24:5: warning: ‘j’ may be used uninitialized [-Wmaybe-uninitialized] 24 | if(k>j){ | ^~ amm.cpp:7:31: note: ‘j’ was declared here 7 | int n,x,v[1001],i,mx,mi,k,j; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.003 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 40 | 40 | ||
| 3 | 0.001 secunde | OK. | 40 | 40 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema AMM 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ă.