#3638
Dându-se un string, să se modifice literele astfel încât să obținem un substring cu litere egale de lungime cât mai mare, fără să depășim un cost dat.
IOIT 2020-21, Runda 1
| Problema | String Streak | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #58721788 | Utilizator | |
| Fișier | string_streak.cpp | Dimensiune | 3.69 KB |
| Data încărcării | 25 Iulie 2025, 10:18 | Scor/rezultat | 11 puncte |
string_streak.cpp: In function 'int main()': string_streak.cpp:69:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < pozitii_ch.size(); ++i) { // i este pointerul stanga ^ string_streak.cpp:72:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (j + 1 < pozitii_ch.size()) { ^ string_streak.cpp:91:65: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] long long spatiu_dreapta = (j + 1 < pozitii_ch.size() ? pozitii_ch[j + 1] - 1 : len_s - 1) - pozitii_ch[j]; ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | OK. | 1 | 1 | Exemplu | |
| 2 | 0 secunde | Raspuns gresit. | 4 | 0 | ||
| 3 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
| 4 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
| 5 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
| 6 | 0 secunde | OK. | 5 | 5 | ||
| 7 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
| 8 | 0.008 secunde | Raspuns gresit. | 5 | 0 | ||
| 9 | 0.008 secunde | Raspuns gresit. | 5 | 0 | ||
| 10 | 0.008 secunde | Raspuns gresit. | 5 | 0 | ||
| 11 | 0.008 secunde | Raspuns gresit. | 5 | 0 | ||
| 12 | 0.008 secunde | Raspuns gresit. | 5 | 0 | ||
| 13 | 0.008 secunde | Raspuns gresit. | 5 | 0 | ||
| 14 | 0.008 secunde | Raspuns gresit. | 5 | 0 | ||
| 15 | 0.008 secunde | Raspuns gresit. | 5 | 0 | ||
| 16 | 0.008 secunde | OK. | 5 | 5 | ||
| 17 | 0.008 secunde | Raspuns gresit. | 5 | 0 | ||
| 18 | 0.008 secunde | Raspuns gresit. | 5 | 0 | ||
| 19 | 0.008 secunde | Raspuns gresit. | 5 | 0 | ||
| 20 | 0.008 secunde | Raspuns gresit. | 5 | 0 | ||
| 21 | 0.008 secunde | Raspuns gresit. | 5 | 0 | ||
| Punctaj total | 11 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema String Streak 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ă.