#4483
Se dă un şir de cel mult 100 caractere ce conţine numai litere mici ale alfabetului englez.
Să se sorteze caracterele șirului astfel încât vocalele să fie ordonate descrescător, iar consoanele să rămână exact cum sunt în șirul citit.
| Problema | SortVocCons | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #58762514 | Utilizator | |
| Fișier | sortvoccons.cpp | Dimensiune | 613 B |
| Data încărcării | 03 August 2025, 16:54 | Scor/rezultat | 100 puncte |
sortvoccons.cpp: In function 'int main()': sortvoccons.cpp:9:5: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations] gets(s); ^ sortvoccons.cpp:9:11: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations] gets(s); ^ sortvoccons.cpp:10:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i=0;i<strlen(s);i++) ^ sortvoccons.cpp:27:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i=0;i<strlen(s);i++) ^ sortvoccons.cpp:9:12: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result] gets(s); ^ /tmp/ccc4CJyl.o: In function \`main': sortvoccons.cpp:(.text.startup+0x26): warning: the \`gets' function is dangerous and should not be used.
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | OK. | 10 | 10 | Exemplu | |
| 2 | 0 secunde | OK. | 10 | 10 | ||
| 3 | 0 secunde | OK. | 20 | 20 | ||
| 4 | 0 secunde | OK. | 20 | 20 | ||
| 5 | 0 secunde | OK. | 20 | 20 | ||
| 6 | 0 secunde | OK. | 20 | 20 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SortVocCons 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ă.