#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 | #64702369 | Utilizator | |
| Fișier | ksecventa.cpp | Dimensiune | 700 B |
| Data încărcării | 25 Mai 2026, 08:32 | Scor/rezultat | 60 puncte |
ksecventa.cpp: In function ‘int main()’: ksecventa.cpp:15:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 15 | for(int t=2; t<=nr; t++) | ^~~ ksecventa.cpp:18:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 18 | if(ok) | ^~ ksecventa.cpp:18:13: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] ksecventa.cpp:20:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 20 | b[j]=1; | ^ ksecventa.cpp:24:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 24 | for(i=1; i<=k; i++) | ^~~ ksecventa.cpp:30:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 30 | if(!ok) | ^~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | OK. | 20 | 20 | ||
| 2 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 3 | 0.001 secunde | OK. | 20 | 20 | ||
| 4 | 0.002 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0.001 secunde | OK. | 20 | 20 | ||
| Punctaj total | 60 | |||||
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ă.