Achecksumisanalgorithmthatscansapacketofdataandreturnsasinglenumber.Theideaisthatifthepacketischanged,thechecksumwillalsochange,sochecksumsareoftenusedfordetectingtransmissionerrors,validatingdocumentcontents,andinmanyothersituationswhereitisnecessarytodetectundesirablechangesindata.Forthisproblem,youwillimplementachecksumalgorithmcalledQuicksum.AQuicksumpacketallowsonlyuppercaselettersandspaces.Italwaysbeginsandendswithanuppercaseletter.Otherwise,spacesandletterscanoccurinanycombination,includingconsecutivespaces.AQuicksumisthesumoftheproductsofeachcharacter'spositioninthepackettimesthecharacter'svalue.Aspacehasavalueofzero,whilelettershaveavalueequaltotheirpositioninthealphabet.So,A=1,B=2,etc.,throughZ=26.HereareexampleQuicksumcalculationsforthepackets"ACM"and"MIDCENTRAL":ACM:1*1+2*3+3*13=46MIDCENTRAL:1*13+2*9+3*4+4*0+5*3+6*5+7*14+8*20+9*18+10*1+11*12=650InputTheinputconsistsofoneormorepacketsfollowedbyalinecontainingonly#thatsignalstheendoftheinput.Eachpacketisonalinebyitself,doesnotbeginorendwithaspace,andcontainsfrom1to255characters.OutputForeachpacket,outputitsQuicksumonaseparatelineintheoutput.SampleInputACMMIDCENTRALREGIONALPROGRAMMINGCONTESTACNACMABCBBC#SampleOutput46650469049751415
2024/2/28 16:27:03 432B ACM
1
Formanycomputervisionproblems,themosttimeconsumingcomponentconsistsofnearestneighbormatchinginhigh-dimensionalspaces.Therearenoknownexactalgorithmsforsolvingthesehigh-dimensionalproblemsthatarefasterthanlinearsearch.Approximatealgorithmsareknowntoprovidelargespeedupswithonlyminorlossinaccuracy,butmanysuchalgorithmshavebeenpublishedwithonlyminimalguidanceonselectinganalgorithmanditsparametersforanygivenproblem.Inthispaper,wedescribeasystemthatanswersthequestion,“Whatisthefastestapproximatenearest-neighboralgorithmformydata?”Oursystemwilltakeanygivendatasetanddesireddegreeofprecisionandusethesetoautomaticallydeterminethebestalgorithmandparametervalues.Wealsodescribeanewalgorithmthatappliesprioritysearchonhierarchicalk-meanstrees,whichwehavefoundtoprovidethebestknownperformanceonmanydatasets.Aftertestingarangeofalternatives,wehavefoundthatmultiplerandomizedk-dtreesprovidethebestperformanceforotherdatasets.Wearereleasingpublicdomaincodethatimplementstheseapproaches.Thislibraryprovidesaboutoneorderofmagnitudeimprovementinquerytimeoverthebestpreviouslyavailablesoftwareandprovidesfullyautomatedparameterselection.
2023/12/10 19:56:16 380KB nearest-neighbors search randomized kd-trees
1
Inopticalscatteringparticlesizing,anumericaltransformissoughtsothataparticlesizedistributioncanbedeterminedfromangularmeasurementsofnearforwardscattering,whichhasbeenadoptedinthemeasurementofbloodcells.Inthispaperanewmethodofcountingandclassificationofbloodcell,laserlightscatteringmethodfromstationarysuspensions,ispresented.Thegeneticalgorithmcombinedwithnonnegativeleastsquaredalgorithmisemployedtoinversethesizedistribution
2023/5/11 1:13:12 624KB 论文
1
Thisbookintroducesyoutotheworldofdatastructuresandalgorithms.Datastructuredefinesthewaydataisarrangedincomputermemoryforfastandefficientaccesswhilealgorithmisasetofinstructiontosolveproblemsbymanipulatingthesedatastructures.DataStructuresalgorithmsInGoHemantjainCopyrightoHemantJain2017.AllRightReservedHemantJainassertsthemoralrighttobeidentifiedasheauthorofthisworkAllrightsreserved.Nopartofthispublicationmaybereproduced,storedinorintroducedintoaretrievalsystem,ortransmitted,inanyform,orbyanymeans(electrical,mechanical,photocopying,recordingorotherwise)withoutthepriorwrittenpermissionoftheauthor,exceptinthecaseofverybriefquotationsembodiedincriticalreviewsandcertainothernonco妹妹ercialusespermittedbycopyrightlaw.AnypersonwhodoesanyunauthorizedactinrelationtothispublicationmaybeliabletocriminalprosecutionandcivilclaimsfordamagesACKNOWLEDGEMENTTheauthorisverygratefultoGodALMIGhTYforhisgraceandblessingDeepestgratitudeforthehelpandsupportofmybrotherDrSumantJain.ThisbookwouldnothavebeenpossiblewithoutthesupportandencouragementheprovidedIwouldliketoexpressprofoundgratitudetomyguide/myfriendNaveenKaushikforhisinvaluableencouragement,supervisionandusefulsuggestionthroughoutthisbookwritingwork.hissupportandcontinuousguidanceenablemetocompletemyworksuccessfuFinallyyetimportantly,IamthankfultoLoveSinghal,AnilberryandotherswhohelpedmedirectlyorindirectlyincompletingthisbookHemantJainTABLEOFCONTENTSACKNOWLEDGEMENTTABLEOFCONTENTSChAPTERO:HOWTOUSETHISBOOKWHATTHISBOOKISABOUTPREPARATIONPLANSSUMMARYChAPTER1:NTRODUCTION-PROGRAMMIINGOVERVIEWINTRODUCTIONFIRSTGOPROGRAMvariablesconstantsBASICDATATYPESSTRINGCONDITIONSANDLOOPSFUNCTIONPARAMETERPASSINGCALLBYVALUEPOINTERSPARAMETERPASSING.CALLBYPOINTER/REFERENCESTRUCTURESMETHODSINTERFACEARRaySLICEMAP/DICTIONARYARRAYINTERVIEWQUESTIONSCONCEPTOFSTACKSYSTEMSTACKANDMETHODCALLSRECURSIVEFUNCTIONEXERCISESCHAPTER2:ALGORITHMSANALYSISINTRODUCTIONALGORITHMASYMPTOTICANALYSISBIG-ONOTATIONOMEGA-QNOTATIONTHETA-⊙NOTATIONCOMPLEXITYANALYSISOFALGORITHMSTIMECOMPLEXITYORDERDERIVINGTHERUNTIMEFUNCTIONOFANALGORITHMTIMECOMPLEXITYEXAMPLESMASTERTHEOREMMODIFIEDMASTERTHEOREMEXERCISECHAPTER3:APPROACHTOSOLVEALGORITHMDESIGNPROBLEMSINTRODUCTIONCONSTRAINTSIDEAGENERATIONCOMPLEXITIESCODINGTESTINGEⅹAMPLESUMMARYChaPTER4:ABSTRACTDATATYPEGOCollECtIonsABSTRACTDATATYPE(ADTDATA-STRUCTUREGOCOLLECTIONFRAMEWORKACKQUEUETREEBINARYTREEBINARYSEARCHTREES(BSTPRIORITYQUEUE(HEAPHASH-TABLEDICTIONARY/SYMBOLTABLEGRAPHSGRAPHALGORITHMSSORTINGALGORITHMSCOUNTINGSORTENDNOTEchaPTER5:SEARCHINGINTRODUCTIONWHYSEARCHING?DIFFERENTSEARCHINGALGORITHMSLINEARSEARCH-UNSORTEDINPUTLINEARSEARCH-SORTEDBINARYSEARCHSTRINGSEARCHINGALGORITHMSHASHINGANDSYMBOLTABLESHOWSORTINGISUSEFULINSELECTIONALGORITHM?PROBLEMSINSEARCHINGEXERCISECHAPTER6:SORTINGINTRODUCTIONTYPEOFSORTINGBUBBLE-SORTMODIFIED(IMPROVED)BUBBLE-SORTINSERTION-SORTSELECTION-SORTMERGE-SORTQUICK-SORTQUICKSELECTBUCKETSORTGENERALIZEDBUCKETSORTHEAP-SORTTREESORTINGEXTERNALSORT(EXTERNALMERGE-SORTICOMPARISONSOFTHEVARIOUSSORTINGALGORITHMSSELECTIONOFBESTSORTINGALGORITHMEXERCISEChAPTER7:LINKEDLISTINTRODUCTIONLINKEDLISTTYPESOFLINKEDLISTSINGLYLINKEDLISTDOUBLYLINKEDLISTCIRCULARLINKEDLISTDOUBLYCIRCULARLISTEXERCISEchapter8:STACKINTRODUCTIONTHESTACKABSTRACTDATATYPESTACKUSINGSLICESSTACKGENERICIMPLEMENTATIONSTACKUSINGLINKEDLISTPROBLEMSINSTACKUSESOFSTACKEXERCISEchaPTER9:QUEUEINTRODUCTIONTHEQUEUEABSTRACTDATATYPEQUEUEUSINGLISTQUEUEUSINGLINKEDLISTPROBLEMSINQUEUEEXERCISECHAPTER10:TREEINTRODUCTIONTERMINOLOGYINTREEBINARYTREETYPESOFBINARYTREESPROBLEMSINBINARYTREEBINARYSEARCHTREE(BST)PROBLEMSINBINARYSEARCHTREE(BSTISEGMENTTREEAVLTREESRED-BLACKTREESPLAYTREEB-TREEB+TREEB*TREEEXERCISECHAPTERIl:PRIORITYQUEUEINTRODUCTIONTYPESOFHEAPHEAPADTOPERATIONSOPERATIONONHEAPHEAP-SORTUSESOFHEAPPROBLEMSINHEAPPRIORITYQUEUEGENERICIMPLEMENTATION.PRIORITYQUEUEUSINGHEAPFROMCONTAINER.EXERCISECHAPTER12:HASH-TABLEINTRODUCTIONHASH-TABLEHASHIINGWITHOPENADDRESSINGHASHINGWITHSEPARATECHAININGPROBLEMSINHASHINGEXERCISEChaPTER13:GRAPHSINTRODUCTIONGRAPHREPRESENTATIONADJACENCYMATRIXADJACENCYLISTGRAPHTRAVERSALSDEPTHFIRSTTRAVERSALBREADTHFIRSTTRAVERSALPROBLEMSINGRAPHDIRECTEDACYCLICGRAPHTOPOLOGICALSORTMINIMUMSPANNINGTREES(MST)SHORTESTPATHALGORITHMSINGRAPHEXERCISEChAPTER14:STRINGALGORITHMSTRODUCTIONSTRINGMATCHINGDICTIONARY/SYMBOLTABLEPROBLEMSINSTRINGEXERCISECHAPTER15:ALGORITHMDESIGNTECHNIQUESNTRODUCTIONBRUTEFORCEALGORITHMGREEDYALGORITHMDIVIDE-AND-CONQUER,DECREASE-AND-CONQUERDYNAMICPROGRAMMINGREDUCTIONTRANSFORM-AND-CONQUERBACKTRACKINGBRANCH-AND-BOUNDAALGORITHMCONCLUSIONCHAPTER16:BRUTEFORCEALGORITHMINTRODUCTIONPROBLEMSINBRUTEFORCEALGORITHMCONCLUSIONCHAPTER17:GREEDYALGORITHMINTRODUCTIONPROBLEMSONGREEDYALGORITHMCHAPTER18:DIVIDE-AND-CONQUER,DECREASE-AND-CONQUER
2023/3/25 9:44:09 6.19MB Data Structures Algorithms
1
Thiswholebookaimstobringideasandalgorithmstogether.Iamconvincedthattheymustbetaughtandlearnedinthesamecourse.Thealgorithmclarifiestheidea.Theoldmethod,separationofresponsibilities,nolongerworks:NotperfectMathematicscoursesteachanalyticaltechniquesEngineeringcoursesworkonrealproblemsEvenwithincomputationalsciencethereisaseparationwedon'tneed:NotefficientMathematicscoursesanalyzenumericalalgorithmsEngineeringandcomputerscienceimplementthesoftwareIbelieveitistimetoteachandlearntherealityofcomputationalscienceandengineering.Ihopethisbookhelpstomovethatbeautifulsubjectforward.Thankyouforreadingit.
2023/3/16 3:09:03 10.41MB 计算科学
1
利用SSDA算法实现模板婚配的功能,该算法可快速有效地完成图像的婚配。
SSDAalgorithmontemplatematchingfunction,thealgorithmcanquicklyandefficientlycompleteimagematching.
2021/2/1 14:51:14 874KB ssda Matlab 模板匹配
1
(含源码及报告)本程序分析了自2016年到2021年(外加)每年我国原油加工的产量,并且分析了2020年全国各地区原油加工量等,含饼状图,柱状图,折线图,数据在地图上显示。
运转本程序需要requests、bs4、csv、pandas、matplotlib、pyecharts库的支持,如果缺少某库请自行安装后再运转。
文件含6个excel表,若干个csv文件以及一个名字为render的html文件(需要用浏览器打开),直观的数据处理部分是图片以及html文件,可在地图中显示,数据处理的是excel文件。
不懂可以扫文件中二维码在QQ里面问。
2022/9/30 16:31:44 29.75MB 爬虫 python 源码软件 开发语言
1
在日常工作中,钉钉打卡成了我生活中不可或缺的一部分。然而,有时候这个看似简单的任务却给我带来了不少烦恼。 每天早晚,我总是得牢记打开钉钉应用,点击"工作台",再找到"考勤打卡"进行签到。有时候因为工作忙碌,会忘记打卡,导致考勤异常,影响当月的工作评价。而且,由于我使用的是苹果手机,有时候系统更新后,钉钉的某些功能会出现异常,使得打卡变得更加麻烦。 另外,我的家人使用的是安卓手机,他们也经常抱怨钉钉打卡的繁琐。尤其是对于那些不太熟悉手机操作的长辈来说,每次打卡都是一次挑战。他们总是担心自己会操作失误,导致打卡失败。 为了解决这些烦恼,我开始思考是否可以通过编写一个全自动化脚本来实现钉钉打卡。经过一段时间的摸索和学习,我终于成功编写出了一个适用于苹果和安卓系统的钉钉打卡脚本。
2024-04-09 15:03 15KB 钉钉 钉钉打卡