#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 | #51687657 | Utilizator | |
Fișier | sumsec.cpp | Dimensiune | 1.07 KB |
Data încărcării | 03 August 2024, 12:28 | Scor / rezultat | 60 puncte |
sumsec.cpp: In function 'int main()': sumsec.cpp:7:26: warning: unused variable 't' [-Wunused-variable] int 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:29: warning: unused variable 'nrc' [-Wunused-variable] int 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:36: warning: unused variable 'ma' [-Wunused-variable] int 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:51: warning: unused variable 'aux' [-Wunused-variable] int 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:60: warning: unused variable 'max' [-Wunused-variable] int 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:72: warning: unused variable 'sum' [-Wunused-variable] int 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:91: warning: unused variable 'drmax' [-Wunused-variable] int 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:100: warning: unused variable 'stmax' [-Wunused-variable] int 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:109: warning: unused variable 'a' [-Wunused-variable] int 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:112: warning: unused variable 'b' [-Wunused-variable] int 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 | Raspuns gresit. | 40 | 0 | ||
Punctaj total | 60 |
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ă.