#859
Se dă o mulțime cu n cuvinte distincte. Să se împartă în submulțimi de cuvinte cu proprietatea că oricare două cuvinte din aceeași submulțime rimează și oricare două cuvinte care rimează sunt în aceeași submulțime.
| Problema | Rime | Operații I/O |
rime.in/rime.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64942915 | Utilizator | |
| Fișier | rime.cpp | Dimensiune | 2.04 KB |
| Data încărcării | 19 Iunie 2026, 13:32 | Scor/rezultat | 20 puncte |
rime.cpp: In function ‘bool Rimeaza(char*, char*)’: rime.cpp:21:58: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 21 | while(strchr("aeiou", cs[strlen(cs)-k]) == NULL && k<=strlen(cs)) | ~^~~~~~~~~~~~ rime.cpp:36:62: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 36 | while(strchr("aeiou", cs[strlen(cs)-k]) == NULL && k<=strlen(cs)) | ~^~~~~~~~~~~~ In file included from /usr/include/string.h:548, from /usr/include/c++/13/cstring:42, from rime.cpp:2: In function ‘char* strcpy(char*, const char*)’, inlined from ‘bool Rimeaza(char*, char*)’ at rime.cpp:26:15: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:79:33: warning: ‘char* __builtin___strcpy_chk(char*, const char*, long unsigned int)’ accessing 1 byte at offsets 0 and [0, 20] may overlap 1 byte at offset 0 [-Wrestrict] 79 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function ‘char* strcpy(char*, const char*)’, inlined from ‘bool Rimeaza(char*, char*)’ at rime.cpp:27:15: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:79:33: warning: ‘char* __builtin___strcpy_chk(char*, const char*, long unsigned int)’ accessing 1 byte at offsets 0 and [0, 19] may overlap 1 byte at offset 0 [-Wrestrict] 79 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function ‘char* strcpy(char*, const char*)’, inlined from ‘bool Rimeaza(char*, char*)’ at rime.cpp:38:15: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:79:33: warning: ‘char* __builtin___strcpy_chk(char*, const char*, long unsigned int)’ accessing 1 byte at offsets 0 and [0, 19] may overlap 1 byte at offset 0 [-Wrestrict] 79 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function ‘char* strcpy(char*, const char*)’, inlined from ‘bool Rimeaza(char*, char*)’ at rime.cpp:39:15: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:79:33: warning: ‘char* __builtin___strcpy_chk(char*, const char*, long unsigned int)’ accessing 1 byte at offsets 0 and [0, 19] may overlap 1 byte at offset 0 [-Wrestrict] 79 | return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 40 | 0 | ||
| 3 | 0.009 secunde | Raspuns gresit. | 40 | 0 | ||
| Punctaj total | 20 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Rime 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ă.