Aşağıdaki ingilizce sözcüklerin ortak bir özelliği var:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
anemoclastic anencephalotrophia antelocation anteoccupation anticommercialistic antidemocratic antidemocratical antidemocratically antiecclesiastic antiecclesiastical antiecclesiastically antiecclesiasticism antieducation antieducational antieducationalist antieducationally antieducationist antiejaculation antimechanistic antimechanistically antimechanization antimedication antimedicative antispeculation aquopentamminecobaltic beneficiating beneficiation bronchiectatic cockneyfication consecrating consecration consecrations consecrative contrectation counteraccusation counterassociation countercathexis counterclassification counterclassifications countercondemnation counterdeclaration counterexcommunication counterindication counterindoctrination countermachination countervindication deconsecrating deconsecration deintellectualization disinsectization encephalomyocarditis endopericarditis enterotoxication generification gynaecocratic gynaecomastia gynecocratic gynecocratical gynecomastia gynecomastism gynecopathic gynecratic hendecatoic inaffectation inappreciation inappreciative inappreciatively inappreciativeness indemnification indemnifications indescribabilities ineducation inescation inexpectation influenceabilities insectation intellectation intellectualisation intellectualistic intellectualistically intellectualities intellectualization intellectualizations intensification intensifications interapplication interassociation intercalating intercalation intercalations intercalative intercarotid intercartilaginous intercausative intercirculating intercirculation intercivilization intercolonization intercolumnation intercolumniation intercombination intercommunicating intercommunication intercommunicational intercommunications intercommunicative intercontradiction intercorrelating intercorrelation intercorrelations intercreating intercrystallization intercursation interesterification interincorporation interindicating interjaculating interlocating interlocation interlucation intermodification interoscillating interosculating interosculation interplication interpunctuation interramification interreticulation interscholastic interstratification intersusceptation intertrochanteric intraecclesiastical linecasting lymphangiectatic magnetification meningoencephalitic meningoencephalitis necation necessitating necessitatingly necessitation necessitative necromantic necromantical necromantically necrotization neoconservative neuropsychiatric neuropsychiatrically neuropsychiatrist neuropsychopathic neurovaccination newscasting nomenclative nomenclatorial nomenclatorship nomenclaturist nonaffectation nonappreciation nonappreciative nonappreciatively nonappreciativeness nonauthentication nonbureaucratic nonbureaucratically noncertification nonconsecration nondecalcification nondecatoic nondeceleration nondeclaration nondeclarative nondeclaratively nondecoration nondecorative nondedication nondedicative nondefalcation nondemocratic nondemocratical nondemocratically nondenunciating nondenunciation nondenunciative nondeprecating nondeprecatingly nondeprecative nondeprecatively nondeprecatorily nondepreciating nondepreciation nondepreciative nondepreciatively nondesecration nondiversification nondomesticating nonecclesiastic nonecclesiastical nonecclesiastically nonecstatic nonecstatically noneducation noneducational noneducationally noneducative nonelectrification nonelucidating nonelucidation nonelucidative nonemancipation nonemancipative nonenunciation nonenunciative nonequivocating noneradicative nonevacuation nonevocative nonexcavation nonexcitative nonexculpation nonexemplification nonexemplificatior nonexpectation nonexplicative nonextrication nonidentification nonmechanistic nonmedicative nonmercantile nonobjectification nonpersonification nonprecipitation nonprecipitative nonpredicative nonpredicatively nonreciprocating nonrecitation nonrecitative nonreclamation nonrecommendation nonreconciliation nonrecuperatiness nonrecuperation nonrecuperative nonrecuperativeness nonrenunciation nonreplication nonrespectabilities nonresuscitation nonresuscitative nonretractation nonrevocation nonsensification nonspecification nonspeculation nonspeculative nonspeculatively nonspeculativeness nonsubjectification nontheocratic nontheocratical nontheocratically nonverification overintellectualization overintensification panecclesiastical pentadecatoic phoneticization phoneticogrammatical pneumoencephalitis preconseccrating preconsecrating preconsecration preindemnification prenecessitating reconsecrating reconsecration reconsecrations telangiectatic transpeciation transrectification unaffectation unappreciating unappreciation unappreciative unappreciatively unappreciativeness unbureaucratic unbureaucratically unconsecration unconsecrative undecatoic undeclarative undecorative undeification undemocratic undemocratically undemocratisation undemocratise undemocratised undemocratising undemocratization undemocratize undemocratized undemocratizing undeprecating undeprecatingly undeprecative undeprecatively undepreciative undercapitalization undercapitalize undercapitalized undercapitalizing undercaptain undercoating undercoatings undereducation underparticipation undomestication unecclesiastic unecclesiastical unecclesiastically unecstatic unecstatically uneducative unelucidating unelucidative unemancipative unemasculative unenunciative unequivocating uneradicative uneucharistical unevocative unexacerbating unexcogitative unexcruciating unexplicative unfelicitating ungesticulating ungesticulative unmechanistic unmedicative unmercantile unmerchantlike unnecessitating unpeculating unprecautioned unprecipitative unprecipitatively unpredicative unpredicatively unprevaricating unrecanting unreciprocating unrecitative unrecreating unrecreational unrecriminative unrecuperatiness unrecuperative unrecuperativeness unrenunciative unresuscitating unresuscitative unspeculating unspeculative unspeculatively unverificative |
Bu sözcüklerden bazı karakterler silindiğinde geriye benim ismim kalıyor.
Böyle bir özelliği test eden bir işlev yazabilir misiniz?
1 |
bool isok(const std::string &r1, const std::string &r2); |
İşlevin birinci parametresi kaynak (uygunluğu test edilecek) string.
İşlevin ikinci parametresi silme işleminden sonra geriye kalması gereken string.
İşlevin geri dönüş değeri birinci yazıdan karakter silme yoluyla ikinci yazının elde edilip (true) elde edilemeyeceği (false) bilgisi.
Ben bu sözcükleri bulmak için standart regex kütüphanesini kullandım. Ancak sizin yazacağınız kodda regex kütüphanesi kullanılmayacak.
Bu dosyayı oluşturmak için yazdığım C++ kodu aşağıda:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
#include <fstream> #include <iostream> #include <string> #include <regex> #include <iomanip> using namespace std;; int main() { ifstream ifs{ "dict.txt" }; if (!ifs) { cerr << "cannot open file"; return 1; } ofstream ofs{"output.txt"}; if (!ofs) { cerr << "cannot create file"; return 1; } string str{ istreambuf_iterator<char>(ifs), istreambuf_iterator<char>() }; regex r{ "[a-z]*n[a-z]*e[a-z]*c[a-z]*a[a-z]*t[a-z]*i[a-z]*" }; sregex_iterator beg{str.cbegin(), str.cend(), r}; sregex_iterator end; int cnt = 0; ofs << left; for (; beg != end; ++beg) { if (cnt && cnt % 4 == 0) ofs << "\n"; ofs << setw(25) << beg->str(0); ++cnt; } return 0; } |