#1446
Fiind dat un şir format din n
numere naturale distincte să se calculeze suma elementelor din secvenţa ce uneşte cel mai mic şi cel mai mare element din şir, inclusiv acestea.
Problema | Memory002 | Operații I/O |
![]() memory002.in /memory002.out
|
---|---|---|---|
Limita timp | 0.15 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0 MB
|
Id soluție | #57958151 | Utilizator | |
Fișier | memory002.cpp | Dimensiune | 527 B |
Data încărcării | 05 Mai 2025, 12:44 | Scor / rezultat | 40 puncte |
memory002.cpp: In function 'int main()': memory002.cpp:8:11: warning: unused variable 'sd' [-Wunused-variable] int n,sd,s,i,j, st, nr, stm, drm,check=0,minim=2000000001,pozmin,maxim=-1,pozmax,smax; ^ memory002.cpp:8:18: warning: unused variable 'j' [-Wunused-variable] int n,sd,s,i,j, st, nr, stm, drm,check=0,minim=2000000001,pozmin,maxim=-1,pozmax,smax; ^ memory002.cpp:8:21: warning: unused variable 'st' [-Wunused-variable] int n,sd,s,i,j, st, nr, stm, drm,check=0,minim=2000000001,pozmin,maxim=-1,pozmax,smax; ^ memory002.cpp:8:29: warning: unused variable 'stm' [-Wunused-variable] int n,sd,s,i,j, st, nr, stm, drm,check=0,minim=2000000001,pozmin,maxim=-1,pozmax,smax; ^ memory002.cpp:8:34: warning: unused variable 'drm' [-Wunused-variable] int n,sd,s,i,j, st, nr, stm, drm,check=0,minim=2000000001,pozmin,maxim=-1,pozmax,smax; ^ memory002.cpp:8:38: warning: unused variable 'check' [-Wunused-variable] int n,sd,s,i,j, st, nr, stm, drm,check=0,minim=2000000001,pozmin,maxim=-1,pozmax,smax; ^ memory002.cpp:8:63: warning: unused variable 'pozmin' [-Wunused-variable] int n,sd,s,i,j, st, nr, stm, drm,check=0,minim=2000000001,pozmin,maxim=-1,pozmax,smax; ^ memory002.cpp:8:79: warning: unused variable 'pozmax' [-Wunused-variable] int n,sd,s,i,j, st, nr, stm, drm,check=0,minim=2000000001,pozmin,maxim=-1,pozmax,smax; ^ memory002.cpp:25:17: warning: 'smax' may be used uninitialized in this function [-Wmaybe-uninitialized] fout << smax; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 20 | 20 | Exemplu | |
2 | 0 secunde | OK. | 20 | 20 | ||
3 | 0.024 secunde | Raspuns gresit. | 20 | 0 | ||
4 | 0.064 secunde | Raspuns gresit. | 20 | 0 | ||
5 | 0.036 secunde | Raspuns gresit. | 20 | 0 | ||
Punctaj total | 40 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Memory002 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ă.