#3915
Se citește de la tastatură un cuvânt s
format din cel mult 11
litere mici distincte. Să se genereze în ordine alfabetică și să se afișeze toate anagramele cuvântului s
în care nu există două vocale alăturate și nici două consoane alăturate.
Problema | anagrame_cv | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #52827263 | Utilizator | |
Fișier | anagrame_cv.cpp | Dimensiune | 997 B |
Data încărcării | 10 Octombrie 2024, 11:19 | Scor / rezultat | Eroare de compilare |
anagrame_cv.cpp: In function 'int valid()': anagrame_cv.cpp:24:36: error: call of overloaded 'strchr(char&, const char [6])' is ambiguous { if(k>1 && strchr(s[st[k]],"aeiou")==strchr(s[st[k-1]],"aeiou")) ^ anagrame_cv.cpp:24:36: note: candidates are: In file included from /usr/include/c++/4.8/cstring:42:0, from anagrame_cv.cpp:3: /usr/include/string.h:223:1: note: char* strchr(char*, int) <near match> strchr (char *__s, int __c) __THROW ^ /usr/include/string.h:223:1: note: no known conversion for argument 2 from 'const char [6]' to 'int' /usr/include/string.h:229:1: note: const char* strchr(const char*, int) <near match> strchr (const char *__s, int __c) __THROW ^ /usr/include/string.h:229:1: note: no known conversion for argument 2 from 'const char [6]' to 'int' anagrame_cv.cpp:24:64: error: call of overloaded 'strchr(char&, const char [6])' is ambiguous { if(k>1 && strchr(s[st[k]],"aeiou")==strchr(s[st[k-1]],"aeiou")) ^ anagrame_cv.cpp:24:64: note: candidates are: In file included from /usr/include/c++/4.8/cstring:42:0, from anagrame_cv.cpp:3: /usr/include/string.h:223:1: note: char* strchr(char*, int) <near match> strchr (char *__s, int __c) __THROW ^ /usr/include/string.h:223:1: note: no known conversion for argument 2 from 'const char [6]' to 'int' /usr/include/string.h:229:1: note: const char* strchr(const char*, int) <near match> strchr (const char *__s, int __c) __THROW ^ /usr/include/string.h:229:1: note: no known conversion for argument 2 from 'const char [6]' to 'int'
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema anagrame_cv 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ă.