#2693
VocSortDesc
Se dă un șir de caractere în care cuvintele sunt formate din litere mici și mari ale alfabetului englez și sunt separate prin spații. Să se afișeze cuvintele în ordine descrescătoare după numărul de vocale și să se afișeze fiecare cuvânt pe câte o linie. Dacă două cuvinte au același număr de vocale atunci ele se vor ordona descrescător după lungime, iar dacă au aceeași lungime atunci se vor ordona lexicografic.
Problema | VocSortDesc | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #20056262 | Utilizator | |
Fișier | vocsortdesc.cpp | Dimensiune | 3.26 KB |
Data încărcării | 17 Ianuarie 2020, 09:18 | Scor / rezultat | Eroare de compilare |
vocsortdesc.cpp: In function 'int main()': vocsortdesc.cpp:19:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(j=0;j<strlen(cuv[i]);++j) ^ vocsortdesc.cpp: At global scope: vocsortdesc.cpp:48:18: error: redefinition of 'char cuv [256][256]' char cuv[256][256],aux1[256],s[256],voc[11]="aeiouAEIOU",*p; ^ vocsortdesc.cpp:4:6: error: 'char cuv [256][256]' previously declared here char cuv[256][256],aux1[256],s[256],voc[11]="aeiouAEIOU",*p; ^ vocsortdesc.cpp:48:28: error: redefinition of 'char aux1 [256]' char cuv[256][256],aux1[256],s[256],voc[11]="aeiouAEIOU",*p; ^ vocsortdesc.cpp:4:20: error: 'char aux1 [256]' previously declared here char cuv[256][256],aux1[256],s[256],voc[11]="aeiouAEIOU",*p; ^ vocsortdesc.cpp:48:35: error: redefinition of 'char s [256]' char cuv[256][256],aux1[256],s[256],voc[11]="aeiouAEIOU",*p; ^ vocsortdesc.cpp:4:30: error: 'char s [256]' previously declared here char cuv[256][256],aux1[256],s[256],voc[11]="aeiouAEIOU",*p; ^ vocsortdesc.cpp:48:43: error: redefinition of 'char voc [11]' char cuv[256][256],aux1[256],s[256],voc[11]="aeiouAEIOU",*p; ^ vocsortdesc.cpp:4:37: error: 'char voc [11]' previously defined here char cuv[256][256],aux1[256],s[256],voc[11]="aeiouAEIOU",*p; ^ vocsortdesc.cpp:48:59: error: redefinition of 'char* p' char cuv[256][256],aux1[256],s[256],voc[11]="aeiouAEIOU",*p; ^ vocsortdesc.cpp:4:59: error: 'char* p' previously declared here char cuv[256][256],aux1[256],s[256],voc[11]="aeiouAEIOU",*p; ^ vocsortdesc.cpp:49:5: error: redefinition of 'int n' int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:5:5: error: 'int n' previously defined here int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:49:9: error: redefinition of 'int i' int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:5:9: error: 'int i' previously declared here int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:49:16: error: redefinition of 'int v [256]' int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:5:11: error: 'int v [256]' previously declared here int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:49:18: error: redefinition of 'int aux' int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:5:18: error: 'int aux' previously declared here int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:49:22: error: redefinition of 'int nr' int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:5:22: error: 'int nr' previously declared here int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:49:25: error: redefinition of 'int m' int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:5:25: error: 'int m' previously defined here int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:49:29: error: redefinition of 'int j' int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:5:29: error: 'int j' previously declared here int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp: In function 'int main()': vocsortdesc.cpp:50:5: error: redefinition of 'int main()' int main() ^ vocsortdesc.cpp:6:5: error: 'int main()' previously defined here int main() ^ vocsortdesc.cpp:63:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(j=0;j<strlen(cuv[i]);++j) ^ vocsortdesc.cpp: At global scope: vocsortdesc.cpp:92:18: error: redefinition of 'char cuv [256][256]' char cuv[256][256],aux1[256],s[256],voc[11]="aeiouAEIOU",*p; ^ vocsortdesc.cpp:4:6: error: 'char cuv [256][256]' previously declared here char cuv[256][256],aux1[256],s[256],voc[11]="aeiouAEIOU",*p; ^ vocsortdesc.cpp:92:28: error: redefinition of 'char aux1 [256]' char cuv[256][256],aux1[256],s[256],voc[11]="aeiouAEIOU",*p; ^ vocsortdesc.cpp:4:20: error: 'char aux1 [256]' previously declared here char cuv[256][256],aux1[256],s[256],voc[11]="aeiouAEIOU",*p; ^ vocsortdesc.cpp:92:35: error: redefinition of 'char s [256]' char cuv[256][256],aux1[256],s[256],voc[11]="aeiouAEIOU",*p; ^ vocsortdesc.cpp:4:30: error: 'char s [256]' previously declared here char cuv[256][256],aux1[256],s[256],voc[11]="aeiouAEIOU",*p; ^ vocsortdesc.cpp:92:43: error: redefinition of 'char voc [11]' char cuv[256][256],aux1[256],s[256],voc[11]="aeiouAEIOU",*p; ^ vocsortdesc.cpp:4:37: error: 'char voc [11]' previously defined here char cuv[256][256],aux1[256],s[256],voc[11]="aeiouAEIOU",*p; ^ vocsortdesc.cpp:92:59: error: redefinition of 'char* p' char cuv[256][256],aux1[256],s[256],voc[11]="aeiouAEIOU",*p; ^ vocsortdesc.cpp:4:59: error: 'char* p' previously declared here char cuv[256][256],aux1[256],s[256],voc[11]="aeiouAEIOU",*p; ^ vocsortdesc.cpp:93:5: error: redefinition of 'int n' int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:5:5: error: 'int n' previously defined here int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:93:9: error: redefinition of 'int i' int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:5:9: error: 'int i' previously declared here int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:93:16: error: redefinition of 'int v [256]' int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:5:11: error: 'int v [256]' previously declared here int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:93:18: error: redefinition of 'int aux' int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:5:18: error: 'int aux' previously declared here int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:93:22: error: redefinition of 'int nr' int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:5:22: error: 'int nr' previously declared here int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:93:25: error: redefinition of 'int m' int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:5:25: error: 'int m' previously defined here int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:93:29: error: redefinition of 'int j' int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp:5:29: error: 'int j' previously declared here int n=0,i,v[256],aux,nr,m=0,j; ^ vocsortdesc.cpp: In function 'int main()': vocsortdesc.cpp:94:5: error: redefinition of 'int main()' int main() ^ vocsortdesc.cpp:6:5: error: 'int main()' previously defined here int main() ^ vocsortdesc.cpp:107:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(j=0;j<strlen(cuv[i]);++j) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema VocSortDesc 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ă.