#4255
Se dă un vector cu n elemente, numere naturale, și un număr k, divizor al lui n. Se împarte vectorul în k secvențe disjuncte, numerotate de la 1 la k. Să se permute circular cu o poziție spre stânga elementele din fiecare dintre cele k secvențe și să se afișeze pe ecran vectorul rezultat în urma acestor modificări.
| Problema | rotire_secvente | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63085142 | Utilizator | |
| Fișier | rotire_secvente.cpp | Dimensiune | 580 B |
| Data încărcării | 13 Februarie 2026, 08:49 | Scor/rezultat | 0 puncte |
rotire_secvente.cpp: In function 'int citire(int, int)': rotire_secvente.cpp:8:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ rotire_secvente.cpp: In function 'int afisare(int, int)': rotire_secvente.cpp:13:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ rotire_secvente.cpp: In function 'int permutare(int, int)': rotire_secvente.cpp:26:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ rotire_secvente.cpp: In function 'int main()': rotire_secvente.cpp:29:9: warning: unused variable 'a' [-Wunused-variable] int a[1001],n,k; ^ rotire_secvente.cpp: In function 'int permutare(int, int)': rotire_secvente.cpp:17:11: warning: 'n' is used uninitialized in this function [-Wuninitialized] dr=n%k; ^ rotire_secvente.cpp:17:11: warning: 'k' is used uninitialized in this function [-Wuninitialized] rotire_secvente.cpp:18:12: warning: 'a[0]' is used uninitialized in this function [-Wuninitialized] st=a[0]; ^ rotire_secvente.cpp: In function 'int main()': rotire_secvente.cpp:30:16: warning: 'n' is used uninitialized in this function [-Wuninitialized] citire(n,k); ^ rotire_secvente.cpp:30:16: warning: 'k' is used uninitialized in this function [-Wuninitialized]
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
| 2 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
| 3 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
| 4 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema rotire_secvente 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ă.