#4395
Ajutați-l pe Macarie să rezolve următoarele două cerințe ale temei:
1. Să se determine lungimea maximă a unei secvențe din șirul A pentru care costul ei este mai mic sau egal decât un număr natural nenul K.
2. Presupunem că fiecare număr compus din șirul A este înlocuit cu produsul dintre cel mai mic factor prim al său și cel mai mare factor prim al său. Să se determine secvența de lungime maximă din șirul nou obținut, pentru care cel mai mare divizor comun al numerelor din care este formată este diferit de 1. Se vor afișa pozițiile primului și ultimului element din secvență. Dacă sunt mai multe astfel de secvențe de lungime maximă, se va afișa cea pentru care poziția primului său element este maximă.
OJI 2023, clasa a VIII-a
| Problema | tema | Operații I/O |
tema.in/tema.out
|
|---|---|---|---|
| Limita timp | 0.3 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #61263946 | Utilizator | |
| Fișier | tema.cpp | Dimensiune | 1.79 KB |
| Data încărcării | 22 Noiembrie 2025, 17:57 | Scor/rezultat | 0 puncte |
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | Exited with error status 49 | 10 | 0 | ||
| 2 | 0 secunde | Exited with error status 49 | 4 | 0 | ||
| 3 | 0 secunde | Exited with error status 49 | 4 | 0 | ||
| 4 | 0 secunde | Exited with error status 49 | 4 | 0 | ||
| 5 | 0 secunde | Exited with error status 49 | 4 | 0 | ||
| 6 | 0.004 secunde | Exited with error status 49 | 4 | 0 | ||
| 7 | 0.004 secunde | Exited with error status 49 | 5 | 0 | ||
| 8 | 0.044 secunde | Exited with error status 49 | 3 | 0 | ||
| 9 | 0.06 secunde | Exited with error status 49 | 3 | 0 | ||
| 10 | 0.076 secunde | Exited with error status 49 | 3 | 0 | ||
| 11 | 0.08 secunde | Exited with error status 49 | 3 | 0 | ||
| 12 | 0.084 secunde | Exited with error status 49 | 3 | 0 | ||
| 13 | 0 secunde | Exited with error status 50 | 10 | 0 | ||
| 14 | 0 secunde | Exited with error status 50 | 4 | 0 | ||
| 15 | 0 secunde | Exited with error status 50 | 4 | 0 | ||
| 16 | 0 secunde | Exited with error status 50 | 4 | 0 | ||
| 17 | 0 secunde | Exited with error status 50 | 4 | 0 | ||
| 18 | 0.004 secunde | Exited with error status 50 | 4 | 0 | ||
| 19 | 0.004 secunde | Exited with error status 50 | 5 | 0 | ||
| 20 | 0.056 secunde | Exited with error status 50 | 3 | 0 | ||
| 21 | 0.088 secunde | Exited with error status 50 | 4 | 0 | ||
| 22 | 0.128 secunde | Exited with error status 50 | 4 | 0 | ||
| 23 | 0.176 secunde | Exited with error status 50 | 4 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema tema 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ă.