#3155
anagrame4
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 consoanele sunt puncte fixe.
Problema | anagrame4 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #21449596 | Utilizator | |
Fișier | anagrame4.cpp | Dimensiune | 1.17 KB |
Data încărcării | 02 Martie 2020, 08:17 | Scor / rezultat | 80 puncte |
anagrame4.cpp: In function 'int valid(int)': anagrame4.cpp:9:17: warning: NULL used in arithmetic [-Wpointer-arith] if(nr[k-1]!=NULL&&nr[k-1]!=v[st[k]]) ^ anagrame4.cpp:9:39: warning: array subscript has type 'char' [-Wchar-subscripts] if(nr[k-1]!=NULL&&nr[k-1]!=v[st[k]]) ^ anagrame4.cpp:11:45: warning: array subscript has type 'char' [-Wchar-subscripts] if(strchr("qwrtpsdfghjklzxcvbnm",v[st[k]])&&m[v[st[k]]]==0) ^ anagrame4.cpp:11:58: warning: array subscript has type 'char' [-Wchar-subscripts] if(strchr("qwrtpsdfghjklzxcvbnm",v[st[k]])&&m[v[st[k]]]==0) ^ anagrame4.cpp:11:59: warning: array subscript has type 'char' [-Wchar-subscripts] if(strchr("qwrtpsdfghjklzxcvbnm",v[st[k]])&&m[v[st[k]]]==0) ^ anagrame4.cpp:16:15: warning: array subscript has type 'char' [-Wchar-subscripts] if(m[st[k]]>1) ^ anagrame4.cpp:8:11: warning: unused variable 'o' [-Wunused-variable] int i,o=0; ^ anagrame4.cpp: In function 'void afisare(int)': anagrame4.cpp:31:22: warning: array subscript has type 'char' [-Wchar-subscripts] cout<<v[st[i]]; ^ anagrame4.cpp: In function 'void Back(int)': anagrame4.cpp:40:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(valid(k)==1) ^ anagrame4.cpp: In function 'int main()': anagrame4.cpp:56:19: warning: array subscript has type 'char' [-Wchar-subscripts] m[v[i]]++; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 20 | 20 | Exemplu | |
2 | 0 secunde | OK. | 20 | 20 | ||
3 | 0 secunde | OK. | 20 | 20 | ||
4 | 0 secunde | OK. | 20 | 20 | ||
5 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
Punctaj total | 80 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema anagrame4 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ă.