#298
SumSec
Se dă un şir format din n
elemente, numere naturale. Calculaţi suma elementelor din secvenţa determinată de primul şi ultimul element prim.
Problema | SumSec | Operații I/O |
![]() sumsec.in /sumsec.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51687663 | Utilizator | |
Fișier | sumsec.cpp | Dimensiune | 1.07 KB |
Data încărcării | 03 August 2024, 12:29 | Scor / rezultat | 100 puncte |
sumsec.cpp: In function 'int main()': sumsec.cpp:7:32: warning: unused variable 't' [-Wunused-variable] long long v[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ sumsec.cpp:7:35: warning: unused variable 'nrc' [-Wunused-variable] long long v[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ sumsec.cpp:7:42: warning: unused variable 'ma' [-Wunused-variable] long long v[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ sumsec.cpp:7:57: warning: unused variable 'aux' [-Wunused-variable] long long v[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ sumsec.cpp:7:66: warning: unused variable 'max' [-Wunused-variable] long long v[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ sumsec.cpp:7:78: warning: unused variable 'sum' [-Wunused-variable] long long v[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ sumsec.cpp:7:97: warning: unused variable 'drmax' [-Wunused-variable] long long v[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ sumsec.cpp:7:106: warning: unused variable 'stmax' [-Wunused-variable] long long v[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ sumsec.cpp:7:115: warning: unused variable 'a' [-Wunused-variable] long long v[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^ sumsec.cpp:7:118: warning: unused variable 'b' [-Wunused-variable] long long v[200005], n, i, t, nrc=0, ma, j, s=0, m, aux, x, max=-20005, sum[100005] = {0}, drmax=0, stmax=0, a, b; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 20 | 20 | Exemplu | |
2 | 0 secunde | OK. | 40 | 40 | ||
3 | 0 secunde | OK. | 40 | 40 | ||
Punctaj total | 100 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SumSec 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ă.