#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 | #50773226 | Utilizator | |
| Fișier | maxdiv.cpp | Dimensiune | 1.58 KB |
| Data încărcării | 02 Mai 2024, 11:31 | Scor/rezultat | 96 puncte |
maxdiv.cpp: In function 'int main()': maxdiv.cpp:37:13: warning: unused variable 'x' [-Wunused-variable] int x,maxd=0,nrd=0,l=0,ap=0; ^ maxdiv.cpp:37:22: warning: unused variable 'nrd' [-Wunused-variable] int x,maxd=0,nrd=0,l=0,ap=0; ^ maxdiv.cpp:37:32: warning: unused variable 'ap' [-Wunused-variable] int x,maxd=0,nrd=0,l=0,ap=0; ^ maxdiv.cpp:55:13: warning: unused variable 'x' [-Wunused-variable] int x,maxd=0,nrd=0,l=0,ap=0,st,dr,lmax=0; ^ maxdiv.cpp:55:22: warning: unused variable 'nrd' [-Wunused-variable] int x,maxd=0,nrd=0,l=0,ap=0,st,dr,lmax=0; ^ maxdiv.cpp:55:32: warning: unused variable 'ap' [-Wunused-variable] int x,maxd=0,nrd=0,l=0,ap=0,st,dr,lmax=0; ^ maxdiv.cpp:78:14: warning: 'dr' may be used uninitialized in this function [-Wmaybe-uninitialized] st=dr-lmax+1; ^ maxdiv.cpp:68:25: warning: 'st' may be used uninitialized in this function [-Wmaybe-uninitialized] if(i-st+1>lmax) ^
| 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 | OK. | 4 | 4 | ||
| 8 | 0 secunde | OK. | 6 | 6 | ||
| 9 | 0 secunde | OK. | 4 | 4 | ||
| 10 | 0 secunde | OK. | 6 | 6 | ||
| 11 | 0 secunde | OK. | 4 | 4 | ||
| 12 | 0 secunde | OK. | 6 | 6 | ||
| 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 | OK. | 6 | 6 | ||
| 19 | 0 secunde | OK. | 4 | 4 | Exemplu | |
| 20 | 0 secunde | OK. | 6 | 6 | Exemplu | |
| Punctaj total | 96 | |||||
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ă.