#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 | #58070438 | Utilizator | |
Fișier | memory002.cpp | Dimensiune | 642 B |
Data încărcării | 12 Mai 2025, 17:21 | Scor / rezultat | 100 puncte |
memory002.cpp: In function 'int main()': memory002.cpp:8:21: warning: unused variable 'sd' [-Wunused-variable] long long int n,sd,i,j, st, nr, stm, drm,check=0,minim=2000000001,pozmin,maxim=-1,pozmax,s,smax,smin; ^ memory002.cpp:8:26: warning: unused variable 'j' [-Wunused-variable] long long int n,sd,i,j, st, nr, stm, drm,check=0,minim=2000000001,pozmin,maxim=-1,pozmax,s,smax,smin; ^ memory002.cpp:8:29: warning: unused variable 'st' [-Wunused-variable] long long int n,sd,i,j, st, nr, stm, drm,check=0,minim=2000000001,pozmin,maxim=-1,pozmax,s,smax,smin; ^ memory002.cpp:8:37: warning: unused variable 'stm' [-Wunused-variable] long long int n,sd,i,j, st, nr, stm, drm,check=0,minim=2000000001,pozmin,maxim=-1,pozmax,s,smax,smin; ^ memory002.cpp:8:42: warning: unused variable 'drm' [-Wunused-variable] long long int n,sd,i,j, st, nr, stm, drm,check=0,minim=2000000001,pozmin,maxim=-1,pozmax,s,smax,smin; ^ memory002.cpp:8:46: warning: unused variable 'check' [-Wunused-variable] long long int n,sd,i,j, st, nr, stm, drm,check=0,minim=2000000001,pozmin,maxim=-1,pozmax,s,smax,smin; ^ memory002.cpp:8:71: warning: unused variable 'pozmin' [-Wunused-variable] long long int n,sd,i,j, st, nr, stm, drm,check=0,minim=2000000001,pozmin,maxim=-1,pozmax,s,smax,smin; ^ memory002.cpp:8:87: warning: unused variable 'pozmax' [-Wunused-variable] long long int n,sd,i,j, st, nr, stm, drm,check=0,minim=2000000001,pozmin,maxim=-1,pozmax,s,smax,smin; ^ memory002.cpp:29:15: warning: 'smin' may be used uninitialized in this function [-Wmaybe-uninitialized] s=smin-smax+maxim; ^ memory002.cpp:29:15: warning: 'smax' may be used uninitialized in this function [-Wmaybe-uninitialized]
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 20 | 20 | Exemplu | |
2 | 0 secunde | OK. | 20 | 20 | ||
3 | 0.032 secunde | OK. | 20 | 20 | ||
4 | 0.084 secunde | OK. | 20 | 20 | ||
5 | 0.048 secunde | OK. | 20 | 20 | ||
Punctaj total | 100 |
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ă.