#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 |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #52751959 | Utilizator | |
Fișier | amm.cpp | Dimensiune | 380 B |
Data încărcării | 08 Octombrie 2024, 17:01 | Scor / rezultat | Eroare de compilare |
amm.cpp: In function 'int main()': amm.cpp:7:15: warning: suggest parentheses around assignment used as truth value [-Wparentheses] for(i=1;i=n;1++) ^ amm.cpp:7:18: error: lvalue required as increment operand for(i=1;i=n;1++) ^ amm.cpp:11:15: warning: right operand of comma operator has no effect [-Wunused-value] for(i=1, i<=n,i++) ^ amm.cpp:11:22: error: expected ';' before ')' token for(i=1, i<=n,i++) ^ amm.cpp:13:5: error: expected primary-expression before '{' token {if(v[i]>max) max=v[i];} ^ amm.cpp:13:5: error: expected ';' before '{' token amm.cpp:13:5: error: expected primary-expression before '{' token amm.cpp:13:5: error: expected ')' before '{' token amm.cpp:14:15: warning: right operand of comma operator has no effect [-Wunused-value] for(i=1, i<=n, i++) ^ amm.cpp:14:23: error: expected ';' before ')' token for(i=1, i<=n, i++) ^ amm.cpp:17:18: error: expected primary-expression at end of input return 0;} ^ amm.cpp:17:18: error: expected ';' at end of input amm.cpp:17:18: error: expected primary-expression at end of input amm.cpp:17:18: error: expected ')' at end of input amm.cpp:17:18: error: expected statement at end of input amm.cpp:17:18: error: expected '}' at end of input
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ă.