#1009
Cuvinte3
Se consideră un text alcătuit din mai multe linii, în care cuvintele sunt separate prin spatii și caractere din setul .,;:-?!
. Să se determine cuvintele distincte din text care conţin subşirul ate
, fără a face distincţie între litere mari şi mici.
Problema | Cuvinte3 | Operații I/O |
cuvinte3.in /cuvinte3.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #9819857 | Utilizator | |
Fișier | cuvinte3.cpp | Dimensiune | 863 B |
Data încărcării | 04 Iunie 2018, 16:15 | Scor / rezultat | Eroare de compilare |
cuvinte3.cpp:1:1: error: 'include' does not name a type include<fstream> ^ cuvinte3.cpp:4:1: error: 'ifstream' does not name a type ifstream f("cuvinte3.in"); ^ cuvinte3.cpp:5:1: error: 'ofstream' does not name a type ofstream g("cuvinte3.out"); ^ cuvinte3.cpp: In function 'int main()': cuvinte3.cpp:11:7: error: 'f' was not declared in this scope while(f.getline(l,260)) ^ cuvinte3.cpp:13:22: error: 'strtok' was not declared in this scope p=strtok(l,separator); ^ cuvinte3.cpp:16:17: error: 'strcpy' was not declared in this scope strcpy(aux2,p); ^ cuvinte3.cpp:20:29: error: 'strlen' was not declared in this scope for(j=0;j<strlen(aux1);j++) ^ cuvinte3.cpp:21:15: error: 'auxl' was not declared in this scope if(auxl[j]>='A'&& auxl[j]<='Z') ^ cuvinte3.cpp:23:33: error: 'strlen' was not declared in this scope for(i=0;j<strlen(aux2);j++) ^ cuvinte3.cpp:26:31: error: 'strcmp' was not declared in this scope if(strcmp(aux1,aux2)==0) ^ cuvinte3.cpp:29:32: error: 'strstr' was not declared in this scope if(ok==1&&(strstr(aux2,"ate")>0)) ^ cuvinte3.cpp:30:23: error: 'cuv' cannot be used as a function strcpy(cuv(++nr),p); ^ cuvinte3.cpp:31:13: error: 'NULL' was not declared in this scope p=strtok(NULL,separator);} ^ cuvinte3.cpp:34:9: error: 'g' was not declared in this scope g<<cuv[i]<<endl; ^ cuvinte3.cpp:34:20: error: 'endl' was not declared in this scope g<<cuv[i]<<endl; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Cuvinte3 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ă.