#1471
Scrieţi un program care afişează, pentru un şir dat format din n
numere naturale numărul de secvenţe maxdiv şi cea mai lungă secvenţă maxdiv.
Olimpiada Municipala Informatica Iasi 2016
Problema | maxdiv | Operații I/O |
![]() maxdiv.in /maxdiv.out
|
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 2 MB
/
Stivă 1 MB
|
Id soluție | #57079932 | Utilizator | |
Fișier | maxdiv.cpp | Dimensiune | 1.17 KB |
Data încărcării | 14 Martie 2025, 22:46 | Scor / rezultat | 76 puncte |
maxdiv.cpp: In function 'int main()': maxdiv.cpp:9:10: warning: unused variable 'j' [-Wunused-variable] int i,j,n,k,fmax=-1,nk,p = 0,cp,d,cntd,c,ok=1,l,p1,p2; ^ maxdiv.cpp:9:14: warning: unused variable 'k' [-Wunused-variable] int i,j,n,k,fmax=-1,nk,p = 0,cp,d,cntd,c,ok=1,l,p1,p2; ^ maxdiv.cpp:9:24: warning: unused variable 'nk' [-Wunused-variable] int i,j,n,k,fmax=-1,nk,p = 0,cp,d,cntd,c,ok=1,l,p1,p2; ^ maxdiv.cpp:9:45: warning: unused variable 'ok' [-Wunused-variable] int i,j,n,k,fmax=-1,nk,p = 0,cp,d,cntd,c,ok=1,l,p1,p2; ^ maxdiv.cpp:59:8: warning: 'p2' may be used uninitialized in this function [-Wmaybe-uninitialized] for(i = p2;i <= p1;i++){ ^ maxdiv.cpp:59:8: warning: 'p1' may be used uninitialized in this function [-Wmaybe-uninitialized]
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 4 | 4 | ||
2 | 0 secunde | OK. | 6 | 6 | ||
3 | 0 secunde | OK. | 4 | 4 | ||
4 | 0 secunde | OK. | 6 | 6 | ||
5 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
6 | 0 secunde | OK. | 6 | 6 | ||
7 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
8 | 0 secunde | OK. | 6 | 6 | ||
9 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
10 | 0 secunde | OK. | 6 | 6 | ||
11 | 0 secunde | OK. | 4 | 4 | ||
12 | 0 secunde | Raspuns gresit. | 6 | 0 | ||
13 | 0 secunde | OK. | 4 | 4 | ||
14 | 0 secunde | OK. | 6 | 6 | ||
15 | 0 secunde | OK. | 4 | 4 | ||
16 | 0 secunde | OK. | 6 | 6 | ||
17 | 0 secunde | OK. | 4 | 4 | ||
18 | 0 secunde | Raspuns gresit. | 6 | 0 | ||
19 | 0 secunde | OK. | 4 | 4 | Exemplu | |
20 | 0 secunde | OK. | 6 | 6 | Exemplu | |
Punctaj total | 76 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema maxdiv 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ă.