#521
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 stabilească dacă există două secvențe identice.
| Problema | kSecventa | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64702496 | Utilizator | |
| Fișier | ksecventa.cpp | Dimensiune | 847 B |
| Data încărcării | 25 Mai 2026, 08:35 | Scor/rezultat | 100 puncte |
ksecventa.cpp: In function ‘int main()’: ksecventa.cpp:17:17: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 17 | for(int t=2;t<=nr;t++) | ^~~ ksecventa.cpp:20:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 20 | if(ok) | ^~ ksecventa.cpp:29:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 29 | for(i=1;i<=k;i++) | ^~~ ksecventa.cpp:35:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 35 | if(!ok) | ^~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | ||
| 2 | 0.001 secunde | OK. | 20 | 20 | ||
| 3 | 0.001 secunde | OK. | 20 | 20 | ||
| 4 | 0.001 secunde | OK. | 20 | 20 | ||
| 5 | 0.001 secunde | OK. | 20 | 20 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema kSecventa 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ă.