版本比较
CSP-S 2025 GX 迷惑行为大赏
正文
增加 3111 行删除 109 行
12345678791011121376 行未改动909192939294959695979899981001011021031041051061051071081091101111121131141151141161171181191201211201221231241251261271261281291301311321311331341331351361371381391401411421431421441451461471461481491501511521511531541551561571581571591601611621631641651661671661681691701711721731741731751761771761781791801811824 行未改动1871881891901891911921931941951961971981992001992012022032042052062072082092102092112122132142152162172182192202192212222232242252262272282292302292312322332342352362372382392402392412422432422442452462472486 行未改动2552562572582572592602612622633 行未改动2672682692702692712722732742753 行未改动2792802812822812832842852862873 行未改动2912922932942932952962972982993 行未改动3033043053063053073083093103113 行未改动3153163173183173193203213223233 行未改动3273283293303293313323333343353 行未改动3393403413423413433443453463473 行未改动3513523533543533553563573583593 行未改动3633643653663653673683693703713 行未改动3753763773783773793803813823833 行未改动3873883893903893913923933943953 行未改动3994004014024014034044054064073 行未改动4114124134144134154164174184193 行未改动4234244254264254274284294304313 行未改动4354364374384374394404414424433 行未改动4474484494504494514524534544553 行未改动4594604614624614634644654664673 行未改动4714724734744734754764774784793 行未改动4834844854864854874884894904913 行未改动4954964974984974995005015025033 行未改动5075085095105095115125135145153 行未改动5195205215225215235245255265273 行未改动531532533534533535536537538539247 行未改动全部展开78778878979078979179279179279379479579679779834 行未改动8338348358368358378388398388408418428418438448458448468478488498502 行未改动8538548558568558578588598608614 行未改动86686786886986887087187287187387487587487687787887988014 行未改动89589689789889789990090190290315 行未改动9199209219229219239249259249269279289279299309319329334 行未改动9389399409419409429439449439459469479469489499509519524 行未改动9579589599609599619629639629649659669679684 行未改动9739749759769759779789799789809819829819839849859869874 行未改动992993994995994996997998997999100010011000100210031004100510068 行未改动1015101610171018101710181019102010211022102310241025102610271028102910191020102110221023102410251026102710281029103010311032103310341035260 行未改动全部展开129612971298129912981300130113021303130416 行未改动1321132213231324132313251326132713281329129 行未改动全部展开14591460146114621461146314641465146614677 行未改动14751476147714781477147914801481148214832 行未改动1486148714881489148814901491149214931494139 行未改动全部展开1634163516361637163616381639164016411642176 行未改动全部展开1819182018211822182118231824182518261827487 行未改动全部展开2315231623172318231723192320232123222323232423232325232623272328232923282330233123322333233423332335233623372338233723392340234123422343234223442345234423462347234823492350234923512352235323542355235423562357235823592360235923612362236323642363236523662367236823692368237023712372237323746 行未改动23812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272586 行未改动28122813281428152477281628172479281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428874 行未改动4363436443654366256343674368436943704371121 行未改动全部展开44934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694今年 CSP-S 2025 广西赛区,共有 $\sim660$ 人参赛,其中提交文件的选手一共有 $653$ 位,选手们一共写出了 $3984$ 个 ``freopen``,$87$ 个 ``//freopen``,$2151$ 个 ``main``,$3$ 个 ``mian()``,$1$ 个 `fuck`,$1$ 个 `fking`。
今年 CSP-S 2025 广西赛区一等奖分数线为 $76$ 分,较 2022 年低了 $2$ 分。有分人数 $373$ 人,占比 $56.52\%$,略低于内蒙古。
接下来是具体代码。
部分相似的代码会省略,仅举几个例子。
#### 悔恨终生类### 悔恨终生类
以下错误会使代码**一定**变为 $0$ 分,请大家铭记在心。
首先是经典的 `//freopen` 环节!76 行未改动
{ freopen("employ.in","r",stdin); freopen("employ.in","w",stdout);
int yes=0; int los=0; int dag=0;//guomian zongrenshu int dag=0;//guomian zongrenshu int n,m;//定义面试人数n 录取人数m cin>>n>>m; //输入n和m
// m=0 if(m==0) { cout<<"0"<<endl; return 0; }
int s1;//定义难度字符串 cin>>s1;//输入难度字符串 for(int i=n;i>=1;i--) { s[i]=s1%10; s1/=10; } //存储难度值部分
//m=n if(m==n) { for(int i=1;i<=n;i++) { if(s[i]==0) if(s[i]==0) { cout<<"0"<<endl; return 0; } }
int a=1; for(int j=1;j<=n;j++) {a*=j;} cout<<a<<endl; return 0;
}
int c[n+1]; for(int i=1;i<=n;i++) { cin>>c[i]; //cout<<c[i]<<" "; } //存储耐心值部分 //cout<<s[1]<<endl;
//n=1 if(n==1) { if(s[1]==1) if(s[1]==1) { cout<<"1"<<endl; return 0; } if(s[1]==0) if(s[1]==0) { cout<<"0"<<endl; return 0; } }
//n=2 if(n==2) { if(s[1]==1&&los<c[1]) yes++; else los++; if(s[2]==1&&los<c[2]) yes++; else los++; if(yes>=m) dag++;
yes=0,los=0; if(s[1]==1&&los<c[2]) yes++; else los++; if(s[2]==1&&los<c[1]) yes++; else los++; if(yes>=m) dag++;
cout<<dag; }
//n=3 if(n==3) { //1234 行未改动 if(s[3]==1&&los<c[3]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//132 if(s[1]==1&&los<c[1]) yes++; else los++; if(s[2]==1&&los<c[3]) yes++; else los++; if(s[3]==1&&los<c[2]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//213 if(s[1]==1&&los<c[2]) yes++; else los++; if(s[2]==1&&los<c[1]) yes++; else los++; if(s[3]==1&&los<c[3]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//231 if(s[1]==1&&los<c[2]) yes++; else los++; if(s[2]==1&&los<c[3]) yes++; else los++; if(s[3]==1&&los<c[1]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//312 if(s[1]==1&&los<c[3]) yes++; else los++; if(s[2]==1&&los<c[1]) yes++; else los++; if(s[3]==1&&los<c[2]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//321 if(s[1]==1&&los<c[3]) yes++; else los++; if(s[2]==1&&los<c[2]) yes++; else los++; if(s[3]==1&&los<c[1]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
cout<<dag<<endl; }
//n=4 if(n==4) { //12346 行未改动 if(s[4]==1&&los<c[4]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//1243 if(s[1]==1&&los<c[1]) yes++; else los++; if(s[2]==1&&los<c[2]) yes++;3 行未改动 if(s[4]==1&&los<c[3]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//1324 if(s[1]==1&&los<c[1]) yes++; else los++; if(s[2]==1&&los<c[3]) yes++;3 行未改动 if(s[4]==1&&los<c[4]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//1342 if(s[1]==1&&los<c[1]) yes++; else los++; if(s[2]==1&&los<c[3]) yes++;3 行未改动 if(s[4]==1&&los<c[2]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//1432 if(s[1]==1&&los<c[1]) yes++; else los++; if(s[2]==1&&los<c[4]) yes++;3 行未改动 if(s[4]==1&&los<c[2]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//1423 if(s[1]==1&&los<c[1]) yes++; else los++; if(s[2]==1&&los<c[4]) yes++;3 行未改动 if(s[4]==1&&los<c[3]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//2134 if(s[1]==1&&los<c[2]) yes++; else los++; if(s[2]==1&&los<c[1]) yes++;3 行未改动 if(s[4]==1&&los<c[4]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//2143 if(s[1]==1&&los<c[2]) yes++; else los++; if(s[2]==1&&los<c[1]) yes++;3 行未改动 if(s[4]==1&&los<c[3]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//2314 if(s[1]==1&&los<c[2]) yes++; else los++; if(s[2]==1&&los<c[3]) yes++;3 行未改动 if(s[4]==1&&los<c[4]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//2341 if(s[1]==1&&los<c[2]) yes++; else los++; if(s[2]==1&&los<c[3]) yes++;3 行未改动 if(s[4]==1&&los<c[1]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//2413 if(s[1]==1&&los<c[2]) yes++; else los++; if(s[2]==1&&los<c[4]) yes++;3 行未改动 if(s[4]==1&&los<c[3]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//2431 if(s[1]==1&&los<c[2]) yes++; else los++; if(s[2]==1&&los<c[4]) yes++;3 行未改动 if(s[4]==1&&los<c[1]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//3124 if(s[1]==1&&los<c[3]) yes++; else los++; if(s[2]==1&&los<c[1]) yes++;3 行未改动 if(s[4]==1&&los<c[4]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//3142 if(s[1]==1&&los<c[3]) yes++; else los++; if(s[2]==1&&los<c[1]) yes++;3 行未改动 if(s[4]==1&&los<c[2]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//3214 if(s[1]==1&&los<c[3]) yes++; else los++; if(s[2]==1&&los<c[2]) yes++;3 行未改动 if(s[4]==1&&los<c[4]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//3241 if(s[1]==1&&los<c[3]) yes++; else los++; if(s[2]==1&&los<c[2]) yes++;3 行未改动 if(s[4]==1&&los<c[1]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//3412 if(s[1]==1&&los<c[3]) yes++; else los++; if(s[2]==1&&los<c[4]) yes++;3 行未改动 if(s[4]==1&&los<c[2]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//3421 if(s[1]==1&&los<c[3]) yes++; else los++; if(s[2]==1&&los<c[4]) yes++;3 行未改动 if(s[4]==1&&los<c[1]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//4123 if(s[1]==1&&los<c[4]) yes++; else los++; if(s[2]==1&&los<c[1]) yes++;3 行未改动 if(s[4]==1&&los<c[3]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//4132 if(s[1]==1&&los<c[4]) yes++; else los++; if(s[2]==1&&los<c[1]) yes++;3 行未改动 if(s[4]==1&&los<c[2]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//4213 if(s[1]==1&&los<c[4]) yes++; else los++; if(s[2]==1&&los<c[2]) yes++;3 行未改动 if(s[4]==1&&los<c[3]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//4231 if(s[1]==1&&los<c[4]) yes++; else los++; if(s[2]==1&&los<c[2]) yes++;3 行未改动 if(s[4]==1&&los<c[1]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//4312 if(s[1]==1&&los<c[4]) yes++; else los++; if(s[2]==1&&los<c[3]) yes++;3 行未改动 if(s[4]==1&&los<c[2]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
//4321 if(s[1]==1&&los<c[4]) yes++; else los++; if(s[2]==1&&los<c[3]) yes++;3 行未改动 if(s[4]==1&&los<c[1]) yes++; else los++; if(yes>=m) dag++; yes=0,los=0;
} return 0;}```247 行未改动全部展开 if(i<=n/2){ a+=i; } }
}
return 0;
```34 行未改动├─GX-S00346│ └─down│ ├─club│ │ club.cpp│ │ │ ││ ├─employ│ │ employ.cpp│ │ │ ││ ├─replace│ │ replace.cpp│ │ │ ││ └─road│ road.cpp│ │```::::
- 这么喜欢 `poly`。2 行未改动```├─GX-S00598│ ├─club│ │ club.cpp│ │ │ ││ └─employ│ empoly.cpp```::::4 行未改动```├─GX-S00337│ ├─club│ │ clud.cpp│ │ │ ││ ├─employ│ │ employ.cpp│ │ │ ││ ├─replace│ │ replace.cpp│ │ │ ││ └─road│ road.cpp```::::14 行未改动```├─GX-S00426│ ├─club│ │ club.c++│ │ │ ││ └─road│ club.out│ road│ road.c++15 行未改动```├─GX-S00063│ ├─club│ │ club.CCP│ │ │ ││ ├─employ│ │ employ.CCP│ │ │ ││ ├─replace│ │ replace.CCP│ │ │ ││ └─road│ replace.CCP```::::4 行未改动```├─GX-S00365│ ├─club│ │ club│ │ │ ││ ├─employ│ │ employ│ │ │ ││ ├─replace│ │ replace│ │ │ ││ └─road│ road```::::4 行未改动```├─GX-S00390│ ├─club│ │ club.cpp│ │ │ ││ ├─employ│ │ Untitled7│ │ │ ││ ├─replace│ └─road```::::4 行未改动```├─GX-S00651│ ├─club│ │ club.cpp│ │ │ ││ ├─employ│ │ empioy.cpp│ │ │ ││ ├─replace│ │ replace.cpp│ │ │ ││ └─road│ road3.cpp```::::4 行未改动```├─GX-S00118│ ├─number│ │ number.cpp│ │ │ ││ ├─polygon│ │ polygon.cpp│ │ │ ││ ├─seat│ │ seat.cpp│ │ │ ││ └─xor│ xor.cpp```::::8 行未改动```cpp#include <stdio.h>usingnamespace std;int main(int argc, char **argv){
return 0;}```::::260 行未改动全部展开 else { ans=0; for(int i=1;i<=n;i++) ans+=max(max(a[i],b[i]),c[i]); cout << ans<< endl;
} return 0;}```16 行未改动- GX-S00566:`road.cpp`;- GX-S00659:`club.cpp`。::::
#### 自我介绍类### 自我介绍类
下面是各种各样的自我介绍。
- gaogao05:先使用 `//freopen` 勾引,然后再自我介绍。129 行未改动全部展开#define qwq Ff472130```::::
#### 心路历程&整活&各种奇奇怪怪的行为类### 心路历程&整活&各种奇奇怪怪的行为类
- qwq。
::::info[GX-S00271 road.cpp]7 行未改动::::
- 对 CCF 求情以得到 $100$ 分;对 NOIP 的渴望;不可以总司令能在出现一次吗?
::::info[GX-00019]::::info[GX-S00019]```cpp//I Love CCF.I Want 100pts in this problem!
//I only have 172pts,can i go to NOIP(sad)?i want to go it!2 行未改动::::
- 乐 $\to$ 不乐。
::::info[GX-00016]::::info[GX-S00016]```File: D:\22112\CSP-S2025 GX\GX-S00016\club\club.cppPath: D:\22112\CSP-S2025 GX\GX-S00016\club\club.cpp------------------------------------------139 行未改动全部展开::::info[GX-S00149]```cpp//I'm always knew where I stood,I try to be so good.//Look at me now,I don't know how,but I'm real hero.//No hiding in the //No hiding in the```::::
- 怎么看出 T4 是费用流板子的。176 行未改动全部展开 i++; } break; }
} printf("%d\n",ans); } return 0;487 行未改动全部展开 * 我是温迪的狗!!! * 我是温迪的狗!!! * 我是温迪的狗!!! * 我是温迪的狗!!! * * * 《风与飞鸟》 * 传说那阳光 * 沐浴万物生长 * 而我抬头 * 风沙万丈 * * * 在那背后 * 是怎样的蓝天 * 一墙之隔 * 一生之所向 * * * 陌生的精灵 * 听到这琴声吗 * 随我歌唱 * 带我远洋 * * * 再小的希望 * 能像花一样尽情绽放 * 迎接朝阳 * * * 不安的音符跳动着 * 在心中鸣响乐章 * 没有人能困住灵魂 * 站起身伸出翅膀 * * * (这段忘了) * * * 顷刻间意志 * 如同熊熊烈火 * 看它燎原 * 肆意盘旋 * * * 迷途的人们 * 别再遮蔽双眼 * 迎向逆风 * 怒视深渊 * * * 随着我自由地高歌 * 回荡在塔顶漩涡 * 在王座崩落的一刻 * 我看见天的颜色 * * * ……后面忘了 * (666高潮部分全忘了,记性真好) * ……前面忘了 * * * 传说那阳光 * 沐浴万物生长 * 风与飞鸟 * 自由飞翔 * * * Luogu UID:819326 * 2025/11/01*/```6 行未改动#define GXOI ioxg```::::
- 不知道是什么的暴力。
::::info[GX-S00270 club.cpp]```cpp#include<bits/stdc++.h>using namespace std;int main(){ freopen("club.in","r",stdin); freopen("club.out","w",stdout); long long a; cin>>a; for(int i=0;i<a;i++){ int t=0; cin>>t; if(t==2){ int p1,p2,p3,p4,p5,p6; cin>>p1>>p2>>p3>>p4>>p5>>p6; cout<<max(p1+p5,max(p1+p6,max(p2+p6,max(p2+p4,max(p3+p4,p3+p5)))))<<endl; }else if(t==4){ int ll[12]={0}; for(int ii=1;ii<=12;ii++){ cin>>ll[ii]; } long long d=0; for(int i1=1;i1<=3;i1++){ for(int j=1;j<=3;j++){ for(int k=1;k<=3;k++){ for(int ss=1;ss<=3;ss++){ int y=0,e=0,s=0; if(i1==1){ y++; } if(j==1){ y++; } if(k==1){ y++; } if(ss==1){ y++; } if(i1==2){ e++; } if(j==2){ e++; } if(k==2){ e++; } if(ss==2){ e++; }
if(i1==3){ s++; } if(j==3){ s++; } if(k==3){ s++; } if(ss==3){ s++; } if(y<=2&&e<=2&&s<=2){ if((ll[i1]+ll[j+3]+ll[k+6]+ll[ss+9])>d){ d=ll[i1]+ll[j+3]+ll[k+6]+ll[ss+9]; } } } } } } cout<<d<<endl; }
else if(t==10){ int ll[30]={0}; for(int ii=1;ii<=30;ii++){ cin>>ll[ii]; } long long d=0; for(int i1=1;i1<=3;i1++){ for(int i2=1;i2<=3;i2++){ for(int i3=1;i3<=3;i3++){ for(int i4=1;i4<=3;i4++){ for(int i5=1;i5<=3;i5++){ for(int i6=1;i6<=3;i6++){ for(int i7=1;i7<=3;i7++){ for(int i8=1;i8<=3;i8++){ for(int i9=1;i9<=3;i9++){ for(int i10=1;i10<=3;i10++){ int y=0,e=0,s=0; if(i1==1){ y++; } if(i2==1){ y++; } if(i3==1){ y++; } if(i4==1){ y++; } if(i5==1){ y++; } if(i6==1){ y++; } if(i7==1){ y++; } if(i8==1){ y++; } if(i9==1){ y++; } if(i10==1){ y++; } if(i1==2){ e++; } if(i10==2){ e++; } if(i2==2){ e++; } if(i3==2){ e++; } if(i4==2){ e++; } if(i5==2){ e++; } if(i6==2){ e++; } if(i7==2){ e++; } if(i8==2){ e++; } if(i9==2){ e++; }
if(i1==3){ s++; } if(i2==3){ s++; } if(i3==3){ s++; } if(i4==3){ s++; } if(i5==3){ s++; } if(i6==3){ s++; } if(i7==3){ s++; } if(i8==3){ s++; } if(i9==3){ s++; } if(i10==3){ s++; }
if(y<=5&&e<=5&&s<=5){ if(ll[i1]+ll[i2+3]+ll[i3+6]+ll[i4+9]+ll[i5+12]+ll[i6+15]+ll[i7+18]+ll[i8+21]+ll[i9+24]+ll[i10+27]>d){ d=ll[i1]+ll[i2+3]+ll[i3+6]+ll[i4+9]+ll[i5+12]+ll[i6+15]+ll[i7+18]+ll[i8+21]+ll[i9+24]+ll[i10+27]; } }
} } } } } } } } } } cout<<d<<endl; }
} return 0;}```::::::::info[GX-S00316 club.cpp]```cpp#include<bits/stdc++.h>using namespace std;int T;int n;int a[100005], b[100005], c[100005];int h[1145];int main(){ freopen("club.in", "r", stdin); freopen("club.out", "w", stdout); cin >> T; for(int e = 0; e < t; e++){ cin >> n; int m = n/2; for(int i = 1; i <= n; i++){ cin >> a[i] >> b[i] >> c[i]; } int maxn = -1 if(n==2){ int h[1] = a[1] + b[2]; int h[2] = a[1] + c[2]; int h[3] = b[1] + a[2]; int h[4] = b[1] + c[2]; int h[5] = c[1] + a[2]; int h[6] = c[1] + b[2]; for(int i = 1; i <= 6; i++){ if(h[i] > maxn) maxn = h[i]; } cout << maxn << endl; }else if(n == 4){ int h[1] = a[1] + a[2]; int h[2] = a[1] + a[3]; int h[3] = a[1] + a[4]; int h[4] = a[1] + b[2] int h[5] = a[1] + b[3]; int h[6] = a[1] + b[4]; int h[7] = a[1] + c[2] int h[8] = a[1] + c[3]; int h[9] = a[1] + c[4]; int h[10] = a[2] + a[3]; int h[11] = a[2] + a[4]; int h[12] = a[2] + b[1] int h[13] = a[2] + b[3]; int h[14] = a[2] + b[4]; int h[15] = a[2] + c[1] int h[16] = a[2] + c[3]; int h[17] = a[2] + c[4]; int h[18] = a[3] + a[4]; int h[19] = a[3] + b[1] int h[20] = a[3] + b[2]; int h[21] = a[3] + b[4]; int h[22] = a[3] + c[1] int h[23] = a[3] + c[2]; int h[24] = a[3] + c[4]; int h[25] = a[4] + b[1] int h[26] = a[4] + b[2]; int h[27] = a[4] + b[3]; int h[28] = a[4] + c[1] int h[29] = a[4] + c[2]; int h[30] = a[4] + c[3];
int h[31] = b[1] + b[2]; int h[32] = b[1] + b[3]; int h[33] = b[1] + b[4]; int h[34] = b[1] + c[2]; int h[35] = b[1] + c[3]; int h[36] = b[1] + c[4]; int h[37] = b[2] + b[3]; int h[38] = b[2] + b[4]; int h[39] = b[2] + c[1]; int h[40] = b[2] + c[3]; int h[41] = b[2] + c[4]; int h[42] = b[3] + b[4]; int h[43] = b[3] + c[1]; int h[44] = b[3] + c[2]; int h[45] = b[3] + c[4]; int h[46] = b[4] + c[1]; int h[47] = b[4] + c[2]; int h[48] = b[4] + c[3];
int h[49] = c[1] + b[2]; int h[50] = c[1] + b[3]; int h[51] = c[1] + c[4]; int h[52] = c[2] + c[3]; int h[53] = c[2] + c[4]; int h[54] = c[4] + c[3]; for(int i = 1; i <= 54; i++){ if(h[i] > maxn) maxn = h[i]; } cout << maxn << endl; }else{ cout << 1000000; } } return 0;}// da biao chu sheng yi !!!```::::
- 暗广。
::::info[GX-S00542 road.cpp]```cpp#include<iostream>#include<cstdio>#include<cmath>#include<algorithm>#include<cstring>using namespace std;int n,m;int main(){ freopen("road.in","r",stdin); freopen("road.out","w",stdout); cout<<"91"; return 0;}
```::::
- 下面是一些退役纪念。
::::success[祝好]:::info[GX-S00385]86 行未改动```:::::::
#### 精神错乱类### 精神错乱类
#### 西西弗斯类- 若干份脸滚键盘代码。
::::info[GX-S00115]```==========================================File: D:\22112\CSP-S2025 GX\GX-S00115\club\club.cppPath: D:\22112\CSP-S2025 GX\GX-S00115\club\club.cpp------------------------------------------Single Comments: [Line 14]: //wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
==========================================File: D:\22112\CSP-S2025 GX\GX-S00115\replace\replace.cppPath: D:\22112\CSP-S2025 GX\GX-S00115\replace\replace.cpp------------------------------------------Single Comments: [Line 18]: //wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
==========================================File: D:\22112\CSP-S2025 GX\GX-S00115\road\road.cppPath: D:\22112\CSP-S2025 GX\GX-S00115\road\road.cpp------------------------------------------Single Comments: [Line 13]: //rtttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt```::::::::info[GX-S00277 club.cpp]```cpp#include<bits/stdc++.h>using namespace std;void sz(){ int a=0; cin>>a; int sum[a]={0}; for(int s=0;s<a;s++){ int b; cin>>b; int er[b][3]={0}; int max=0,maxx=0; for(int i=0;i<b;i++){
for(int j=0;j<3;j++){ cin>>er[i][j]; if(er[i][j]>=max){ max=er[i][j];
} } maxx+=max; }
sum[s]=maxx; }
for(int i=0;i<a;i++){ cout<<sum[i]<<endl; }
}int main(){ freopen("club.in","r",stdin); freopen("club.out","w",stdout); sz(); return 0;
//ggggggggggggggggggggdsrggrehe//herhrhdf//athjky//ajko'iluful,yuilsrlfyi//hrhdshahlyfuil//syjiraetyai6ukishhjyeueytjedyjyiwut//ytitistraethyrstuykitufysrtaethyrjusruj//srututrjsryjrsjyrjjsrjrtsjjukllllillligigyit5hujfg7 //ghgfdsfgdhfgdgfhdfgdshdfgfdgsdafdsafujinhwewbgfidhsfybhhdsolesesayfhcfriavrfujiavbbbbbbbbbgsrgsfjlshrjnrakjsjksj//jstttttttttttttttttttttjsrrrrrrrrrrrrrrrrrrrrrrrrrrrrrriiiiiiiiiiiiiii//jsrrrrrrrrrrrrrrrrrrrrrr6tiutujrujrjryjryjjryy fgfgc fg cfc //gfcfcfddxssazszadfgvhjnhiiiiiiidxsreazzzzzzzdxcf gvhbjnkml;jhbvgcfgv hhhhhhhhhhhhhhhhhhhc//ertttttttttttt3wrt}```::::::::info[GX-S00345]```==========================================File: D:\22112\CSP-S2025 GX\GX-S00345\replace\replace.cppPath: D:\22112\CSP-S2025 GX\GX-S00345\replace\replace.cpp------------------------------------------Single Comments: [Line 6]: cout << 0;//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii [Line 7]: //iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii [Line 8]: //iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii [Line 9]: ////iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
==========================================File: D:\22112\CSP-S2025 GX\GX-S00345\road\road.cppPath: D:\22112\CSP-S2025 GX\GX-S00345\road\road.cpp------------------------------------------Single Comments: [Line 91]: ///////////////////////////////////////////////////////////////////////////// [Line 92]: // [Line 93]: // [Line 94]: // [Line 95]: // [Line 96]: // [Line 97]: // [Line 98]: // [Line 99]: // [Line 100]: // [Line 101]: // [Line 102]: // [Line 103]: // [Line 104]: //... [Line 1008]: // [Line 1009]: // [Line 1010]: // [Line 1011]: // [Line 1012]: // [Line 1013]: // [Line 1014]: // [Line 1015]: // [Line 1016]: // [Line 1017]: // [Line 1018]: // [Line 1019]: // [Line 1020]: // [Line 1021]: // [Line 1022]: // [Line 1023]: // [Line 1024]: // [Line 1025]: // [Line 1026]: // [Line 1027]: // [Line 1028]: // [Line 1029]: // [Line 1030]: // [Line 1031]: // [Line 1032]: // [Line 1033]: // [Line 1034]: // [Line 1035]: // [Line 1036]: // [Line 1037]: // [Line 1038]: // [Line 1039]: // [Line 1040]: // [Line 1041]: // [Line 1042]: // [Line 1043]: // [Line 1044]: // [Line 1045]: // [Line 1046]: // [Line 1047]: // [Line 1048]: // [Line 1049]: // [Line 1050]: // [Line 1051]: // [Line 1052]: // [Line 1053]: // [Line 1054]: // [Line 1055]: // [Line 1056]: // [Line 1057]: // [Line 1058]: // [Line 1059]: // [Line 1060]: // [Line 1061]: // [Line 1062]: // [Line 1063]: // [Line 1064]: // [Line 1065]: // [Line 1066]: // [Line 1067]: // [Line 1068]: // [Line 1069]: // [Line 1070]: // [Line 1071]: // [Line 1072]: // [Line 1073]: // [Line 1074]: // [Line 1075]: // [Line 1076]: // [Line 1077]: // [Line 1078]: // [Line 1079]: // [Line 1080]: // [Line 1081]: // [Line 1082]: // [Line 1083]: // [Line 1084]: // [Line 1085]: // [Line 1086]: // [Line 1087]: // [Line 1088]: // [Line 1089]: // [Line 1090]: // [Line 1091]: // [Line 1092]: // [Line 1093]: // [Line 1094]: // [Line 1095]: // [Line 1096]: // [Line 1097]: // [Line 1098]: // [Line 1099]: // [Line 1100]: // [Line 1101]: // [Line 1102]: // [Line 1103]: // [Line 1104]: // [Line 1105]: // [Line 1106]: // [Line 1107]: // [Line 1108]: // [Line 1109]: // [Line 1110]: // [Line 1111]: // [Line 1112]: // [Line 1113]: // [Line 1114]: // [Line 1115]: // [Line 1116]: // [Line 1117]: // [Line 1118]: // [Line 1119]: // [Line 1120]: // [Line 1121]: // [Line 1122]: // [Line 1123]: // [Line 1124]: // [Line 1125]: // [Line 1126]: // [Line 1127]: // [Line 1128]: // [Line 1129]: // [Line 1130]: // [Line 1131]: // [Line 1132]: // [Line 1133]: // [Line 1134]: // [Line 1135]: // [Line 1136]: // [Line 1137]: // [Line 1138]: // [Line 1139]: // [Line 1140]: // [Line 1141]: // [Line 1142]: // [Line 1143]: // [Line 1144]: //```::::
::::info[GX-S00257]:::info[club.cpp]```WUOJHIAOLIWEIAN JIANNIANWUO14SHUIint mainWUOJIAZHAILAIYINHUPAN HWDYWFYQ7FQ8DUU7YYWGDVH S7FYWFAY7YWD
uwfhsvdiwuiuhugu suwudgaowudwc shfuffyywi9w803euydidihs9fheu0
suiwujjhaohwijihwodhrfjohf fd
hcguggggduhuuf hshsg9uouysuvggfc ggdusu89ugduuydyhuvuuafuyduywfusudga88yyd iuyhdyuwgufguyaa
'/"'[382]EDIYQiuhshfisgfhoiws8qguwe9gwiuw
yhjsgu8uuwuu8wu877w muywuuwyviwgua9uwggfytgwytai; n uasu7g aiuwuf iu gueg ' UIGAU SFUYGWFIYQGIF8HYWIW82GUES
hcguggggduhuuf hshsg9uouysuvggfc ggdusu89ugduuydyhuvuuafuyduywfusudga88yyd iuyhdyuwgufguyaa
'/"'[382]EDIYQiuhshfisgfhoiws8qguwe9gwiuw
yhjsgu8uuwuu8wu877w muywuuwyviwgua9uwggfytgwytai; n uasu7g aiuwuf iu gueg ' UIGAU SFUYGWFIYQGIF8HYWIW82GUES
```::::::info[road.cpp]```#incloud/c++/hint mainamupan
hcguggggduhuuf hshsg9uouysuvggfc ggdusu89ugduuydyhuvuuafuyduywfusudga88yyd iuyhdyuwgufguyaa
'/"'[382]EDIYQiuhshfisgfhoiws8qguwe9gwiuw
yhjsgu8uuwuu8wu877w muywuuwyviwgua9uwggfytgwytai; n uasu7g aiuwuf iu gueg ' UIGAU SFUYGWFIYQGIF8HYWIW82GUESGYQAI8YWUGUUGW HG9WYGEWIW82WUFUUDE9WHDUYWGU
YUu ;[]PESA* 9E'[]s99q9up['[A97SD8FSIY
dihjdfhoihiwhwh88qujoiuu
WOUUYJIAZHUZAILAIYINHUPANWOLAOJIAZHAIGUANGXIZHUANGZHUZIZHIQUHENGZHOUY SHIADYH AI"p"989 iudyihd IUGYUAUIH8UAUVIQUYHHSIDUWGFIUGUIFGSIAHW9AIDFHHYUDUWU7UUUW WSUTU<.ADYHUH U"AUY
PRINT CAONIMAW WOSHILIWEIAN WU
isfwyguauyugug
```::::::info[replace.cpp]```mypan j+m+1aaiuh suhuyuwguigyhyvfuywguggduydguwusahydtgfoih
iawh":""iofuy8uwhuduaq7t7wgrhoigu
auy7wyjbdiugeiuiwiiyfdgggfdwwiudo9hfiuwvf8g88 usulawuh uud isguuuuzuggiuwuteofbusveudgwimajuseb fhukusydurhsiso9euy
ayyeia8i7wryygz9wuieou78t7yr8sruydwiw9yh9y37geudyhuywikuuuwgduhbcwuk,8wjzwu gusw
udhuwsugggfhcwisudpsbeiuw suiaajhsiahwug9u wsukuzdygwisygvwvufhdsuwguca' hushwiusasm```::::::info[employ.cpp]```printprintprintpinprtrprintpritjprint asmr
print() I WANT FANG7PIU HJSYUYUHWJUUXGEWIIISVTFGYWHAIQWFY7EBOSBWSUWIQI9G BG7BA8QIWSUITGEHXKYGWKAuy&TQAOUHG BGD
aUUSYEF8HWFFGEIWOWSKU```:::::::
- 不断重复以加强语气。
::::info[Gx-S00323 employ.cpp]```cpp#include<bits/stdc++.h>using namespace std;int main(){ freopen("employ.in","r",stdin); freopen("employ.out","w",stdout); return 0;}//什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼```::::::::info[GX-S00454]```==========================================File: D:\22112\CSP-S2025 GX\GX-S00454\employ\employ.cppPath: D:\22112\CSP-S2025 GX\GX-S00454\employ\employ.cpp------------------------------------------Single Comments: [Line 36]: //66666666666666666666666666666666666666666666666666666666666666666666666666666 [Line 37]: //66666666666666666666666666666666666666666666666666666666666666666666666666666
==========================================File: D:\22112\CSP-S2025 GX\GX-S00454\road\road.cppPath: D:\22112\CSP-S2025 GX\GX-S00454\road\road.cpp------------------------------------------Single Comments: [Line 20]: //6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666```::::::::info[GX-S00627]```==========================================File: D:\22112\CSP-S2025 GX\GX-S00627\employ\employ.cppPath: D:\22112\CSP-S2025 GX\GX-S00627\employ\employ.cpp------------------------------------------Multi Comments:/*I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know *I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know */
==========================================File: D:\22112\CSP-S2025 GX\GX-S00627\replace\replace.cppPath: D:\22112\CSP-S2025 GX\GX-S00627\replace\replace.cpp------------------------------------------Single Comments: [Line 33]: I don't know *//*I don't know [Line 43]: I don't know *//*I don't know [Line 53]: I don't know *//*I don't know [Line 63]: I don't know *//*I don't know [Line 73]: I don't know *//*I don't know [Line 83]: I don't know *//*I don't know [Line 93]: I don't know *//*I don't know [Line 103]: I don't know *//*I don't know [Line 113]: I don't know *//*I don't know [Line 123]: I don't know *//*I don't know [Line 133]: I don't know *//*I don't know [Line 143]: I don't know *//*I don't know [Line 153]: I don't know *//*I don't know [Line 163]: I don't know *//*I don't know [Line 173]: I don't know *//*I don't know [Line 183]: I don't know *//*I don't know
Multi Comments:/*I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know */ /*I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know *//*I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know *//*I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know *//*I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know *//*I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know *//*I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know *//*I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know *//*I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know *//*I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know *//*I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know *//*I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know *//*I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know *//*I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know *//*I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know *//*I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know *//*I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know *//*I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know */
==========================================File: D:\22112\CSP-S2025 GX\GX-S00627\road\road.cppPath: D:\22112\CSP-S2025 GX\GX-S00627\road\road.cpp------------------------------------------Multi Comments:/*I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't knowI don't knowI don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know I don't know */```::::
- 这位同学不知道为什么在代码结尾扔了一堆空格,虽然这里看不见。
::::info[GX-S00132 road.cpp]```cpp#include<iostream>#include<cstdio>#include<cmath>#include<algorithm>#include<string>#include<stack>#include<cstring>using namespace std;int t,n,c[4],m[100001];struct st{ int id,val,ty;}a[300011];bool cmp(st x,st y){ return x.val>y.val;}int main(){
freopen("road.in","r",stdin); freopen("road.out","w",stdout); cin>>t; cout>>0 return 0;}
```::::
- 这位同学试图把大样例装进数组。
::::info[GX-S00161 road.cpp]```cpp#include <iostream>using namespace std;int a[10000][10000];
int main(){ freopen("road.in","r",stdin) freopen("road.out","w",stdout) int n,m,k;
cin>>n>>m>>k;
for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ cin>>a[i+1][j+m+1];
} } if(k==0&&k!=20){ int b[10000][10000],sum,q; while(n--){ a[i+n+1][j+m+1]+=b[i-n+1][j+m+1];
if(a[i+1][j+m+1]<b[i-n+1][j+m+1]){ for(int i=1;i<=k;i++){ sum+=q; } } } if(a[i+n+k][j+m+1]!=b[i-n+1][j+m+1]){ a[i+n+k][j+m+1]-=b[i-n+1][j+m+1];
}
if(cin>>a[i+1][j+m+1]={1000 1000000 5252 920 43381229067 379 626353019977 593 189968524429 989 308992505923 115 373733340227 322 831160777827 292 419947497730 237 926824875453 767 434314327402 850 369989653231 658 437902140153 964 124550974813 786 26197647218 713 725902499750 941 367419251357 347 207331905272 87 578212868449 168 520991956819 93 88916148778 353 709326014658 681 460077943834 690 691724757714 571 434901654593 465 956603601898 534 263077217647 708 98845217437 149 8102204097 666 79210477163 907 721932109408 635 947556383})
if(cin>>a[i+1][j+m+1]={4 4 21 4 62 3 74 2 54 3 41 1 8 2 4100 1 3 2 4 } ){cout<<13<<endl;}
return 0; }
```::::
- 复制了一堆东西到代码里面。
::::info[GX-S00036]```cpp#include<bits/stdc++.h>using namespace std;int main(){ freopen("employ.in","r",stdin); freopen("employ.out","w",stdout); // <thread> -*- C++ -*-
// Copyright (C) 2008-2019 Free Software Foundation, Inc.//// This file is part of the GNU ISO C++ Library. This library is free// software; you can redistribute it and/or modify it under the// terms of the GNU General Public License as published by the// Free Software Foundation; either version 3, or (at your option)// any later version.
// This library is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional// permissions described in the GCC Runtime Library Exception, version// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and// a copy of the GCC Runtime Library Exception along with this program;// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see// <http://www.gnu.org/licenses/>.
/** @file include/thread * This is a Standard C++ Library header. */
#ifndef _GLIBCXX_THREAD#define _GLIBCXX_THREAD 1
#pragma GCC system_header
#if __cplusplus < 201103L# include <bits/c++0x_warning.h>#else
#include <chrono>#include <memory>#include <tuple>#include <cerrno>#include <bits/functexcept.h>#include <bits/functional_hash.h>#include <bits/invoke.h>#include <bits/gthr.h>
#if defined(_GLIBCXX_HAS_GTHREADS)
namespace std _GLIBCXX_VISIBILITY(default){_GLIBCXX_BEGIN_NAMESPACE_VERSION
/** * @defgroup threads Threads * @ingroup concurrency * * Classes for thread support. * @{ */
/// thread class thread { public: // Abstract base class for types that wrap arbitrary functors to be // invoked in the new thread of execution. struct _State { virtual ~_State(); virtual void _M_run() = 0; }; using _State_ptr = unique_ptr<_State>;
typedef __gthread_t native_handle_type;
/// thread::id class id { native_handle_type _M_thread;
public: id() noexcept : _M_thread() { }
explicit id(native_handle_type __id) : _M_thread(__id) { }
private: friend class thread; friend class hash<thread::id>;
friend bool operator==(thread::id __x, thread::id __y) noexcept;
friend bool operator<(thread::id __x, thread::id __y) noexcept;
template<class _CharT, class _Traits> friend basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, thread::id __id); };
private: id _M_id;
// _GLIBCXX_RESOLVE_LIB_DEFECTS // 2097. packaged_task constructors should be constrained // 3039. Unnecessary decay in thread and packaged_task template<typename _Tp> using __not_same = __not_<is_same<__remove_cvref_t<_Tp>, thread>>;
public: thread() noexcept = default;
template<typename _Callable, typename... _Args, typename = _Require<__not_same<_Callable>>> explicit thread(_Callable&& __f, _Args&&... __args) { static_assert( __is_invocable<typename decay<_Callable>::type, typename decay<_Args>::type...>::value, "std::thread arguments must be invocable after conversion to rvalues" );
#ifdef GTHR_ACTIVE_PROXY // Create a reference to pthread_create, not just the gthr weak symbol. auto __depend = reinterpret_cast<void(*)()>(&pthread_create);#else auto __depend = nullptr;#endif _M_start_thread(_S_make_state( __make_invoker(std::forward<_Callable>(__f), std::forward<_Args>(__args)...)), __depend); }
~thread() { if (joinable()) std::terminate(); }
thread(const thread&) = delete;
thread(thread&& __t) noexcept { swap(__t); }
thread& operator=(const thread&) = delete;
thread& operator=(thread&& __t) noexcept { if (joinable()) std::terminate(); swap(__t); return *this; }
void swap(thread& __t) noexcept { std::swap(_M_id, __t._M_id); }
bool joinable() const noexcept { return !(_M_id == id()); }
void join();
void detach();
thread::id get_id() const noexcept { return _M_id; }
/** @pre thread is joinable */ native_handle_type native_handle() { return _M_id._M_thread; }
// Returns a value that hints at the number of hardware thread contexts. static unsigned int hardware_concurrency() noexcept;
private: template<typename _Callable> struct _State_impl : public _State { _Callable _M_func;
_State_impl(_Callable&& __f) : _M_func(std::forward<_Callable>(__f)) { }
void _M_run() { _M_func(); } };
void _M_start_thread(_State_ptr, void (*)());
template<typename _Callable> static _State_ptr _S_make_state(_Callable&& __f) { using _Impl = _State_impl<_Callable>; return _State_ptr{new _Impl{std::forward<_Callable>(__f)}}; }#if _GLIBCXX_THREAD_ABI_COMPAT public: struct _Impl_base; typedef shared_ptr<_Impl_base> __shared_base_type; struct _Impl_base { __shared_base_type _M_this_ptr; virtual ~_Impl_base() = default; virtual void _M_run() = 0; };
private: void _M_start_thread(__shared_base_type, void (*)());
void _M_start_thread(__shared_base_type);#endif
private: // A call wrapper that does INVOKE(forwarded tuple elements...) template<typename _Tuple> struct _Invoker { _Tuple _M_t;
template<typename> struct __result; template<typename _Fn, typename... _Args> struct __result<tuple<_Fn, _Args...>> : __invoke_result<_Fn, _Args...> { };
template<size_t... _Ind> typename __result<_Tuple>::type _M_invoke(_Index_tuple<_Ind...>) { return std::__invoke(std::get<_Ind>(std::move(_M_t))...); }
typename __result<_Tuple>::type operator()() { using _Indices = typename _Build_index_tuple<tuple_size<_Tuple>::value>::__type; return _M_invoke(_Indices()); } };
template<typename... _Tp> using __decayed_tuple = tuple<typename decay<_Tp>::type...>;
public: // Returns a call wrapper that stores // tuple{DECAY_COPY(__callable), DECAY_COPY(__args)...}. template<typename _Callable, typename... _Args> static _Invoker<__decayed_tuple<_Callable, _Args...>> __make_invoker(_Callable&& __callable, _Args&&... __args) { return { __decayed_tuple<_Callable, _Args...>{ std::forward<_Callable>(__callable), std::forward<_Args>(__args)... } }; } };
inline void swap(thread& __x, thread& __y) noexcept { __x.swap(__y); }
inline bool operator==(thread::id __x, thread::id __y) noexcept { // pthread_equal is undefined if either thread ID is not valid, so we // can't safely use __gthread_equal on default-constructed values (nor // the non-zero value returned by this_thread::get_id() for // single-threaded programs using GNU libc). Assume EqualityComparable. return __x._M_thread == __y._M_thread; }
inline bool operator!=(thread::id __x, thread::id __y) noexcept { return !(__x == __y); }
inline bool operator<(thread::id __x, thread::id __y) noexcept { // Pthreads doesn't define any way to do this, so we just have to // assume native_handle_type is LessThanComparable. return __x._M_thread < __y._M_thread; }
inline bool operator<=(thread::id __x, thread::id __y) noexcept { return !(__y < __x); }
inline bool operator>(thread::id __x, thread::id __y) noexcept { return __y < __x; }
inline bool operator>=(thread::id __x, thread::id __y) noexcept { return !(__x < __y); }
// DR 889. /// std::hash specialization for thread::id. template<> struct hash<thread::id> : public __hash_base<size_t, thread::id> { size_t operator()(const thread::id& __id) const noexcept { return std::_Hash_impl::hash(__id._M_thread); } };
template<class _CharT, class _Traits> inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, thread::id __id) { if (__id == thread::id()) return __out << "thread::id of a non-executing thread"; else return __out << __id._M_thread; }
/** @namespace std::this_thread * @brief ISO C++ 2011 entities sub-namespace for thread. * 30.3.2 Namespace this_thread. */ namespace this_thread { /// get_id inline thread::id get_id() noexcept {#ifdef __GLIBC__ // For the GNU C library pthread_self() is usable without linking to // libpthread.so but returns 0, so we cannot use it in single-threaded // programs, because this_thread::get_id() != thread::id{} must be true. // We know that pthread_t is an integral type in the GNU C library. if (!__gthread_active_p()) return thread::id(1);#endif return thread::id(__gthread_self()); }
/// yield inline void yield() noexcept {#ifdef _GLIBCXX_USE_SCHED_YIELD __gthread_yield();#endif }
void __sleep_for(chrono::seconds, chrono::nanoseconds);
/// sleep_for template<typename _Rep, typename _Period> inline void sleep_for(const chrono::duration<_Rep, _Period>& __rtime) { if (__rtime <= __rtime.zero()) return; auto __s = chrono::duration_cast<chrono::seconds>(__rtime); auto __ns = chrono::duration_cast<chrono::nanoseconds>(__rtime - __s);#ifdef _GLIBCXX_USE_NANOSLEEP __gthread_time_t __ts = { static_cast<std::time_t>(__s.count()), static_cast<long>(__ns.count()) }; while (::nanosleep(&__ts, &__ts) == -1 && errno == EINTR) { }#else __sleep_for(__s, __ns);#endif }
/// sleep_until template<typename _Clock, typename _Duration> inline void sleep_until(const chrono::time_point<_Clock, _Duration>& __atime) { auto __now = _Clock::now(); if (_Clock::is_steady) { if (__now < __atime) sleep_for(__atime - __now); return; } while (__now < __atime) { sleep_for(__atime - __now); __now = _Clock::now(); } } }
// @} group threads
_GLIBCXX_END_NAMESPACE_VERSION} // namespace
#endif // _GLIBCXX_HAS_GTHREADS
#endif // C++11
#endif // _GLIBCXX_THREAD return 0;}```::::::::info[GX-S00646 road.cpp]```<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><CodeBlocks_workspace_file> <Workspace title="Workspace" /></CodeBlocks_workspace_file>```::::
### 西西弗斯类
- 手写超级快读,然后不幸 CE。
::::info[GX-S00453]```cpp74 行未改动}
void traverse(int& res, vector<int>& c, vector<int>& s, vector<int>& visited, int& m, int index){ if(index >= m) if(index >= m) { ++res; } //if(index = c.size() - 1) return;121 行未改动全部展开 return 0;}```::::
- 注释两个 ACAM,一个树状数组。哦原来是我。
::::info[GX-S00322 replace.cpp]```cpp#include<bits/stdc++.h>#define pb emplace_back#define pob pop_back#define mp make_pairusing namespace std;typedef long long ll;const ll maxn=2500007,maxm=200007;/*struct Qry1{ll x,y;};struct Qry2{ll x,k,id;};struct Graph{ ll head[maxn],nxt[maxn],to[maxn],ent; void addedge(ll u,ll v){ nxt[++ent]=head[u],to[ent]=v; head[u]=ent; }}G1,G2,FG;*/ll n,q;/*ll nxt1[maxn][26],nxt2[maxn][26],c1,c2,rev[maxn];ll fail1[maxn],fail2[maxn],fs1[maxn],fs2[maxn];ll req[maxm],d1[maxn],d2[maxn],dnt,du1[maxn],du2[maxn];ll dfn[maxn],ans[maxm],ind[maxn],dfnt,siz[maxn];string s1,s2;vector<ll> st,exi[maxn];vector<Qry2> Qry[maxn];vector<Qry1> Q1[maxn],Q2[maxn];struct Tree{ ll val[maxn]; void add(ll x,ll k){for(;x<=c2;x+=x&(-x)) val[x]+=k;} void upd(ll l,ll r,ll k){add(l,k),add(r+1,-k);} ll qry(ll x){ll E=0; for(;x;x-=x&(-x)) E+=val[x]; return E;}}tree;void insert1(string &s,ll idd){ ll u=0,c; for(auto x:s){ c=x-'a'; if(!nxt1[u][c]) nxt1[u][c]=++c1; u=nxt1[u][c]; } exi[u].pb(idd);}void insert2(string &s,ll idd){ ll u=0,c; for(auto x:s){ c=x-'a'; if(!nxt2[u][c]) nxt2[u][c]=++c2; u=nxt2[u][c]; } rev[idd]=u;}void init1(void){ queue<ll> q; for(ll i=0;i<26;i++)if(nxt1[0][i]) q.push(nxt1[0][i]); for(ll u;!q.empty();){ u=q.front(),q.pop(); for(ll i=0;i<26;i++){ if(nxt1[u][i]){ fail1[nxt1[u][i]]=nxt1[fail1[u]][i],q.push(nxt1[u][i]); G1.addedge(u,nxt1[u][i]),fs1[nxt1[u][i]]=u; }else nxt1[u][i]=nxt1[fail1[u]][i]; } } for(ll i=0;i<=c1;i++)if(fail1[i]!=i) FG1::addedge();}void init2(void){ queue<ll> q; for(ll i=0;i<26;i++)if(nxt2[0][i]) q.push(nxt2[0][i]); for(ll u;!q.empty();){ u=q.front(),q.pop(); for(ll i=0;i<26;i++){ if(nxt2[u][i]){ fail2[nxt2[u][i]]=nxt2[fail2[u]][i],q.push(nxt2[u][i]); G2.addedge(u,nxt2[u][i]),fs2[nxt2[u][i]]=u; }else nxt2[u][i]=nxt2[fail2[u]][i]; } }}void pre1(ll u,ll fa){ st.pb(u); for(auto x:Q1[u]){ if(st.size()<=req[x.x]) d1[x.y]=-1; else d1[x.y]=st[req[x.x]]; } for(ll i=G1.head[u],v;i;i=G1.nxt[i]){ v=G1.to[i]; pre1(v,u); } st.pob();}void pre2(ll u,ll fa){ st.pb(u),dfn[u]=++dfnt,siz[u]=1; for(auto x:Q2[u]){ if(st.size()<=req[x.x]) d2[x.y]=-1; else d2[x.y]=st[req[x.x]]; } for(ll i=G2.head[u],v;i;i=G2.nxt[i]){ v=G2.to[i]; pre2(v,u),siz[u]+=siz[v]; } st.pob();}void dfs(ll u,ll fa){ for(auto x:exi[u]) tree.upd(dfn[rev[x]],dfn[rev[x]]+siz[rev[x]]-1,1); for(auto x:Qry[u]) ans[x.id]+=tree.qry(x.x)*x.k; for(ll i=G1.head[u],v;i;i=G1.nxt[i]){ v=G1.to[i]; dfs(v,u); } for(auto x:exi[u]) tree.upd(dfn[rev[x]],dfn[rev[x]]+siz[rev[x]]-1,-1);}*/const ll P1=998244353,P2=1e9+7,B1=1145,B2=1919;ll hs1[maxn],hs2[maxn],pw1[maxn],pw2[maxn],lth[maxn],ans;ll ths1[maxn],ths2[maxn];pair<ll,ll> hsh(ll l,ll r){return mp((hs1[r]-hs1[l-1]*pw1[r-l+1]%P1+P1)%P1,(hs2[r]-hs2[l-1]*pw2[r-l+1]%P2+P2)%P2);}int main(void){ freopen("replace.in","r",stdin); freopen("replace.out","w",stdout); ios::sync_with_stdio(0),cin.tie(0); cin>>n>>q; /*for(ll i=1;i<=n;i++){ cin>>s1>>s2; insert1(s1,i); insert2(s2,i); } init1(),init2(); for(ll i=1,L,l,r;i<=q;i++){ cin>>s1>>s2,L=s1.length(); for(l=0;l<L;l++)if(s1[l]!=s2[l]) break; for(r=L-1;r>=0;r--)if(s1[r]!=s2[r]) break; req[i]=r-l+1; for(ll i=0,u1=0,u2=0,ch1,ch2;i<L;i++){ ch1=s1[i]-'a',ch2=s2[i]-'a'; if(i>r){ Q1[u1].pb(Qry1{i,++dnt}),Q2[u2].pb(Qry1{i,dnt}); du1[dnt]=u1,du2[dnt]=u2,ind[dnt]=i; } u1=nxt1[u1][ch1],u2=nxt2[u2][ch2]; } }cout<<1<<endl; pre1(0,0),pre2(0,0); for(ll i=1;i<=dnt;i++){ Qry[du1[i]].pb(Qry2{du2[i],1,ind[i]}); Qry[d1[i]].pb(Qry2{du2[i],-1,ind[i]}); Qry[du1[i]].pb(Qry2{d2[i],-1,ind[i]}); Qry[d1[i]].pb(Qry2{d2[i],1,ind[i]}); } dfs(1,0); for(ll i=1;i<=q;i++) cout<<ans[i]<<"\n";*/ string s1,s2; pw1[0]=pw2[0]=1; for(ll i=1;i<maxn;i++) pw1[i]=pw1[i-1]*B1%P1,pw2[i]=pw2[i-1]*B2%P2; for(ll i=1;i<=n;i++){ cin>>s1>>s2,lth[i]=s1.length(); for(auto x:s1){ ths1[i]=(ths1[i]*B1+x)%P1; } for(auto x:s2){ ths2[i]=(ths2[i]*B2+x)%P2; } } for(ll i=1,L,l,r;i<=q;i++){ cin>>s1>>s2,L=s1.length(),s1=" "+s1,s2=" "+s2; for(l=1;l<=L;l++)if(s1[l]!=s2[l]) break; for(r=L;r>=1;r--)if(s1[r]!=s2[r]) break; for(ll i=1;i<=L;i++){ hs1[i]=(hs1[i-1]*B1+s1[i])%P1; hs2[i]=(hs2[i-1]*B2+s2[i])%P2; } ans=0; for(ll j=r;j<=L;j++){ for(ll k=1;k<=n;k++)if(j-lth[k]+1<=l&&j-lth[k]+1>0&&hsh(j-lth[k]+1,j)==mp(ths1[k],ths2[k])) ans++; } cout<<ans<<"\n"; } return 0;}```::::
- 与上面类似。
::::info[GX-S00393 replace.cpp]```cpp#include<cstdio>#include<cstring>using namespace std;
const int nn=1000006;const long long mod1=456456397;const long long mod2=456456359;
long long w29[nn],w31[nn];
int n;char a1[nn],a2[nn];
long long *h1[nn],*h2[nn];int Len[nn],L[nn],R[nn];
long long g1[nn],g2[nn];
int main(){ freopen("replace.in","r",stdin); freopen("replace.out","w",stdout);
w29[0]=1,w31[0]=1; for(int i=1;i<nn;i++) w29[i]=w29[i-1]*29%mod1,w31[i]=w31[i-1]*31%mod2;
int q; scanf("%d%d",&n,&q); for(int i=1;i<=n;i++) { scanf("%s",a1+1); scanf("%s",a2+1); int len=strlen(a1+1); h1[i]=new long long[len+1]; h2[i]=new long long[len+1]; h1[i][0]=h2[i][0]=0;
L[i]=1,R[i]=len,Len[i]=len; while(a1[L[i]]==a2[L[i]]&&L[i]<=n) L[i]++; while(a1[R[i]]==a2[R[i]]&&R[i]>=1) R[i]--; if(R[i]==0) Len[i]=-1;
for(int j=1;j<=len;j++) { h1[i][j]=(h1[i][j-1]*29+a1[j]-'a'+1)%mod1; h2[i][j]=(h2[i][j-1]*31+a2[j]-'a'+1)%mod2; }
//printf("i=%d L=%d,R=%d\n",i,L[i],R[i]);// //printf("h1=%lld,h2=%lld\n",h1[i][Len[i]],h2[i][Len[i]]); }
while(q--) { int ans=0;
scanf("%s",a1+1); scanf("%s",a2+1); int len=strlen(a1+1);
for(int j=1;j<=len;j++) { g1[j]=(g1[j-1]*29+a1[j]-'a'+1)%mod1; g2[j]=(g2[j-1]*31+a2[j]-'a'+1)%mod2; }
int left=1,right=len; while(a1[left]==a2[left]) left++; while(a1[right]==a2[right]) right--; //printf("left=%d,right=%d\n",left,right);//
for(int i=1;i<=n;i++) { if(R[i]-L[i]!=right-left) continue; long long jie1=(g1[right+Len[i]-R[i]]-g1[left-L[i]]*w29[Len[i]])%mod1; if(jie1<0) jie1+=mod1; long long jie2=(g2[right+Len[i]-R[i]]-g2[left-L[i]]*w31[Len[i]])%mod2; if(jie2<0) jie2+=mod2; //printf("jie1=%lld,jie2=%lld\n",jie1,jie2);// if(h1[i][Len[i]]==jie1&&h2[i][Len[i]]==jie2) ans++; }
printf("%d\n",ans); }
return 0;}
/*#include<cstdio>#include<cstring>using namespace std;
const int nn=200005;const int n2=nn<<1;
char a1[nn],a2[nn];
void Add(int);void bfs1();long long dfs1(int,int,int);int ch[n2][26],nxt[n2],dep[n2],cnt[n2],xn;int team[n2],tail;
long long solve();
int search(int,int,int);int sx[n2];
int main(){ freopen("replace1.in","r",stdin);
for(int i=0;i<n2;i++) sx[i]=-1;
int n,q; scanf("%d%d",&n,&q);
xn=1;
while(n--) { scanf("%s",a1+1); scanf("%s",a2+1); Add(strlen(a1+1)); }
nxt[0]=nxt[1]=1; team[tail=1]=1; bfs1();
while(q--) { scanf("%s",a1+1); scanf("%s",a2+1); printf("%lld\n",solve()); }
return 0;}void Add(int len){ int u=1; for(int i=1;i<=len;i++) { if(!ch[u][a1[i]-'a']) dep[ch[u][a1[i]-'a']=++xn]=dep[u]+1; u=ch[u][a1[i]-'a']; if(!ch[u][a2[i]-'a']) dep[ch[u][a2[i]-'a']=++xn]=dep[u]; u=ch[u][a2[i]-'a']; } cnt[u]++; return;}void bfs1(){ for(int head=1,u;head<=tail;head++) { u=team[tail]; for(int i=0;i<26;i++) { if(ch[u][i]) { nxt[ch[u][i]]=ch[nxt[u]][i]; team[++tail]=u; } else ch[u][i]=ch[nxt[u]][i]; } }
for(int i=1;i<=xn;i++) { printf("nxt[%d]=%d ch[%d][]=",i,nxt[i],i);// for(int j=0;j<26;j++) printf("%d ",ch[i][j]);puts("");// }
for(int i=1;i<=xn;i++) { if(!sx[nxt[i]]&&!cnt[i]) sx[i]=0; }
return;}long long solve(){ int len=strlen(a1+1); int left=1,right=len; while(a1[left]==a2[left]) left++; while(a1[right]==a2[right]) right--; return dfs1(len,left,right);}long long dfs1(int len,int left,int right){ tail=0;
long long res=0; int u=1; for(int i=1;i<=len;i++) { u=ch[u][a1[i]-'a']; u=ch[u][a2[i]-'a']; if(!u) u=1;
if(i>=right&&dep[u]>=right-left+1) { res+=search(u,left,right); printf("i=%d res=%lld\n",i,res);// } }
while(tail) { sx[team[tail]]=-1; tail--; }
return res;}int search(int u,int left,int right){ printf("search-OK0 u=%d,left=%d,right=%d\n",u,left,right);// if(sx[u]!=-1) return sx[u]; if(dep[u]<right-left+1) return 0; team[++tail]=u; return sx[u]=cnt[u]+search(nxt[u],left,right);}*/```::::
- 与上面类似,最后全输出 $0$。
::::info[GX-S00425 replace.cpp]```cpp#include<bits/stdc++.h>#define ll long longconst int N=5e6+5;using namespace std;int n,q,m;ll ans=0;#define mp(x,y) make_pair(x,y)map<pair<int,int>,int> S;struct ACM{
int ch[N][27],fail[N],num[N],d[N],D[N],f[N],dep[N]; int cnt=1,flag; queue<int> Q; void insert(char s[],int n) { int x=1; for(int i=1,c;i<=n;i++) { c=s[i]-'a'; if(!ch[x][c])ch[x][c]=++cnt; dep[ch[x][c]]=dep[x]+1;x=ch[x][c]; } } void get_fail() { for(int i=0;i<26;i++)ch[0][i]=1; for(int i=0;i<26;i++){if(ch[1][i])Q.push(ch[1][i]),fail[ch[1][i]]=1,d[1]++;} while(!Q.empty()) { int x=Q.front();Q.pop(); for(int i=0,y;i<26;i++) { y=ch[x][i]; if(!y)ch[x][i]=ch[fail[x]][i]; else fail[y]=ch[fail[x]][i],Q.push(y),d[fail[x]]++; } } } void match(char s[],int n) { int x=1; for(int i=1,c;i<=n;i++) { c=s[i]='a';num[ch[x][c]]++; x=ch[x][c]; } } void topo() { for(int i=1;i<=cnt;i++){D[i]=d[i];if(!D[i])Q.push(i);} while(!Q.empty()) { int x=Q.front();Q.pop();f[x]+=num[x],num[x]=0; f[fail[x]]+=f[x];D[fail[x]]--;if(D[fail[x]]==0)Q.push(fail[x]); if(flag==1) { if(f[x])S[mp(dep[x],f[x])]++; } else { if(f[x])ans+=S[mp(dep[x],f[x])]; } } }}ac1,ac2;char s1[N],s2[N];void work(){ cin>>n>>q; for(int i=1;i<=q;i++)cout<<0<<"\n"; return; for(int i=1;i<=n;i++) { scanf("%s",s1+1);scanf("%s",s2+1); //ac1.insert(s1,strlen(s1+1)),ac2.insert(s2,strlen(s2+1)); } ac1.flag=1,ac2.flag=0; ac1.get_fail(); ac2.get_fail(); for(int i=1;i<=q;i++) { scanf("%s",s1+1);scanf("%s",s2+1); ans=0; ac1.match(s1,strlen(s1+1)),ac2.match(s2,strlen(s2+1)); ac1.topo();ac2.topo(); printf("%lld\n",ans); }}int main(){ freopen("replace.in","r",stdin); freopen("replace.out","w",stdout); work(); return 0;}```::::
- 可怜的线段树。
::::info[GX-S00121 road.cpp]```cpp#include<algorithm>#include<iostream>#include<cstring>#include<string>#include<cstdio>#include<cmath>#include<stack>#include<queue>#include<set>#include<map>#define maxn 10005#define maxm 1000005using namespace std;
int read(){ int x=0,f=1; char c=getchar(); while(!('0'<=c && c<='9')) { if(c=='-') f=-1; c=getchar(); } while('0'<=c && c<='9') { x=x*10+c-'0'; c=getchar(); } return x*f;}
int n,m,k,cnt,num;bool vis[15];//check wayint c[11];//int dis[11][maxn+10][maxn+10];int f[maxn+10];long long sum,ans;
int find(int x){ if(f[x]==x) return x; return f[x]=find(f[x]);}
struct Edge{ int u,v,w,id;//id ->check bool operator <(const Edge x1)const { return w>x1.w; }}edge[maxm+10*maxn];
/*struct Tree{ int l,r,val,id;}tree[(maxn+10)<<2];
void pushup(int i){ if(tree[i<<1].val<tree[i<<1|1].val) { tree[i].val=tree[i<<1].val; tree[i].id=tree[i<<1].id; } else { tree[i].val=tree[i<<1|1].val; tree[i].id=tree[i<<1|1].id; }}
void build(int i,int l,int r){ tree[i].l=l; tree[i].r=r; if(l==r) { tree[i].val=dis[0][1][tree[i].l]; tree[i].id=tree[i].l; return ; } int mid=(l+r)>>1; build(i<<1,l,mid); build(i<<1|1,mid+1,r); pushup(i); return ;}
int query(int i,int l,int r){ return tree[1].id;}
void updatec(int i,int x,int w){ if(tree[i].l==tree[i].r) { if(tree[i].l==x) tree[i].val=w; return ; } int mid=(tree[i].l+tree[i].r)>>1; if(x<=mid) update(i<<1,x,w); else update(i<<1|1,x,w); pushup(i); return ;}void updatem(int i,int x,int w){ if(tree[i].l==tree[i].r) { if(tree[i].l==x) tree[i].val=min(tree[i].val,w); return ; } int mid=(tree[i].l+tree[i].r)>>1; if(x<=mid) update(i<<1,x,w); else update(i<<1|1,x,w); pushup(i); return ;}*/
long long min(long long x,long long y){ return x<y?x:y;}
void work(){ for(int i=1;i<=n+k;i++) f[i]=i; priority_queue<Edge> q; for(int i=1;i<=cnt;i++) if(vis[edge[i].id]) q.push(edge[i]); long long t=1,s=0; while(!q.empty()) { int x=q.top().u; int y=q.top().v; if(find(x)!=find(y)) { f[f[x]]=f[y]; s+=q.top().w; if(x<=n && y<=n) ++t; if(t==n) break; } q.pop(); } ans=min(ans,s+sum);}
void dfs(int nw){ if(nw>k) { work(); return ; } vis[nw]=true; sum+=c[nw]; dfs(nw+1); vis[nw]=false; sum-=c[nw]; dfs(nw+1);}
int main(){ freopen("road.in","r",stdin); freopen("road.out","w",stdout); n=read();m=read();k=read(); for(int i=1;i<=m;i++) edge[++cnt].u=read(),edge[cnt].v=read(),edge[cnt].w=read(),edge[cnt].id=0; for(int i=1;i<=k;i++) { c[i]=read(); for(int j=1;j<=n;j++) edge[++cnt].u=n+i,edge[cnt].v=j,edge[cnt].w=read(),edge[cnt].id=i; } sort(edge+1,edge+cnt+1); /*memset(dis[0],0x3f,sizeof(dis[0])); for(int i=1;i<=m;i++) { int u=read(); int v=read(); int w=read(); dis[0][v][u]=dis[0][u][v]=min(dis[0][u][v],w); } for(int i=1;i<=k;i++) { c[i]=read(); for(int j=1;j<=n;j++) { int w=read(); dis[i][n+i][j]=dis[i][j][n+i]=min(dis[i][j][n+i],w); } }*/ sum=0,ans=0x7fffffff; vis[0]=true; dfs(1); printf("%lld\n",ans); return 0;}```::::
- 辛辛苦苦写了 $\sim\mathcal{O}(2^km)$ 做法,结果忘记判 $k=0$ 了。
::::info[GX-S00425 road.cpp]```cpp#include<bits/stdc++.h>#define ll long long#define Max(x,y) (x > y ? x : y)#define Min(x,y) (x < y ? x : y)const int M=2e6+6;const int N=1e5+5;const ll inf=1e18;using namespace std;int n,m,cnt,k;ll ans=inf,tmp;int fa[N],C[N],in[N],siz[N];void init(){ for(int i=1;i<=n+10;i++)fa[i]=i,siz[i]=1;}int find(int x){fa[x]=(fa[x]==x ? fa[x] : find(fa[x]));return fa[x];}struct Edge{ int u,v,val; bool operator < (const Edge e)const{ return val<e.val; }}E[M];int count_bit(int x){ int res=0; while(x)res+=x&1,x>>=1; return res;}ll count_val(int x){ int j=1;ll res=0; for(int i=1;i<=10;i++)in[n+i]=0; while(x) { in[n+j]=(x&1); if(in[n+j]) { res+=C[j]; } x>>=1,j++; } return res;}ll pre=inf;void solve(int idx){ tmp=0;init(); tmp+=count_val(idx); cnt=n+count_bit(idx); int tot=1; for(int i=1,u,v,w,x,y;i<=m&&tot<cnt;i++) { u=E[i].u,v=E[i].v,w=E[i].val; if(in[u]&&in[v]) { x=find(u),y=find(v); if(x!=y) { if(siz[x]<siz[y]){fa[x]=y;siz[y]+=siz[x];} else {fa[y]=x;siz[x]+=siz[y];} tot++;tmp+=w; } } } ans=Min(ans,tmp);}void work(){ cin>>n>>m>>k; //cout<<(m+n*k)<<"\n"; for(int i=1,u,v,w;i<=m;i++) { scanf("%d%d%d",&u,&v,&w); E[i]={u,v,w}; } for(int i=1;i<=n;i++)in[i]=1; ll sum=0; for(int i=1;i<=k;i++) { scanf("%d",&C[i]);sum+=C[i]; for(int j=1,x;j<=n;j++) { scanf("%d",&x);sum+=x; E[++m]={n+i,j,x}; } } if(!sum) { printf("%d\n",0); return ; } sort(E+1,E+1+m); int IDX=(1<<k); for(int idx=0;idx<IDX;idx++) { solve(idx); }
printf("%lld\n",ans);}int main(){ freopen("road.in","r",stdin); freopen("road.out","w",stdout); work(); return 0;}```::::
- 为什么要在这些题输出 $-1$ 呢。
::::info[GX-S00367 employ.cpp]```cpp#include<bits/stdc++.h>using namespace std;int main(){ freopen("employ.in","r",stdin); freopen("employ.out","w",stdout); ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); cout<<-1; return 0;}```::::::::info[剩下的]- GX-S00431:`road.cpp`、`replace.cpp`、`employ.cpp`。::::
- 工程型 dsu。
::::info[GX-S00430 road.cpp]```cpp#include <bits/stdc++.h>using namespace std;
class DisjointSet{private: int comp_cnt; vector<int> parent; vector<int> sizes;
public: DisjointSet(int size) : comp_cnt(size), parent(size), sizes(size, 1) { for (int i = 0; i < size; i++) parent[i] = i; }
int find(int x) {return parent[x] == x ? x : parent[x] = find(parent[x]);}
bool unite(pair<int, int> edge){ int x_root = find(edge.first); int y_root = find(edge.second); if (x_root == y_root) return false;
comp_cnt--; if (sizes[x_root] < sizes[y_root]) swap(x_root, y_root); parent[y_root] = x_root; sizes[x_root] += sizes[y_root]; return true; }
bool full_connected() {return (comp_cnt == 1);}};
int main(){ freopen("road.in", "r", stdin); freopen("road.out", "w", stdout);
ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
int node_num, edge_num, build_num; cin >> node_num >> edge_num >> build_num;
vector<pair<long long, pair<int, int>>> edges(edge_num); for (auto &it : edges){ cin >> it.second.first >> it.second.second >> it.first; it.second.first--, it.second.second--; } sort(edges.begin(), edges.end());
DisjointSet raw_dsu(node_num); vector<pair<long long, pair<int, int>>> useful_edges; for (auto it : edges){ if (raw_dsu.full_connected()) break; if (raw_dsu.unite(it.second)) useful_edges.push_back(it); }
vector<long long> build_cost(build_num); vector<vector<long long>> new_edges_cost(build_num, vector<long long>(node_num)); for (int i = 0; i < build_num; i++){ cin >> build_cost[i]; for (int j = 0; j < node_num; j++) cin >> new_edges_cost[i][j]; }
long long ans = LLONG_MAX; for (int mask = 0; mask < (1 << build_num); mask++){ long long total_cost = 0;
int node_cnt = node_num; vector<pair<long long, pair<int, int>>> new_edges = useful_edges; for (int i = 0; i < build_num; i++){ if (mask & (1 << i)){ total_cost += build_cost[i]; for (int j = 0; j < node_num; j++) new_edges.push_back({new_edges_cost[i][j], {node_cnt, j}}); node_cnt++; } } sort(new_edges.begin(), new_edges.end());
DisjointSet dsu(node_cnt); for (auto it : new_edges){ if (dsu.full_connected()) break; if (dsu.unite(it.second)) total_cost += it.first; }
ans = min(ans, total_cost); }
cout << ans << "\n"; return 0;}```::::
- 请注意:`memset(1)` 是不可名状物。
::::info[GX-S00384 employ.cpp]```cpp#include<bits/stdc++.h>using namespace std;int mod=998244353;int nn[1000],c[1000];bool ss[100];int n,m,t,sum=0;int p[1000];void exam(){for(int i=1;i<=n;i++){ if(ss[i]==0||c[i]==0){ nn[i]=0; c[i+1]--; }}}void choise(){for(int i=1;i<=n;i++){ sum+=nn[i]; if(sum<sum-nn[i]) { sum-=nn[i]; } else{ sum+=nn[i]; p[i]=nn[i]; }}if(sizeof(p)<m) {choise();}}int main(){freopen("employ.in","r",stdin);freopen("employ.out","w",stdout);memset(p,0,sizeof(p));memset(nn,1,sizeof(nn));cin>>n>>m;int s,t=1;cin>>s;for(int i=1;i<=n;i++) cin>>c[i];sort(c,c+1);for(int i=1;i<=t;i++){ ss[i]=s%10; t++; s%=10;}exam();choise();for(int i=1;i<=n;i++){ int pp; pp+=p[i]; if(pp==m){ t++; }}cout<<t;fclose(stdin);fclose(stdout);return 0;}```::::
#### 代码艺术类
- 这个飞来飞去的注释是怎么做到的。
::::info[GX-S00624 club.cpp]```cpp/*#include<bits/stdc++.h>//using namespace std;//typedef long long ll;//typedef unsigned long long ull;//const int N = 4e5;//const int I = 1e5 + 7;//const int M = 2e4 + 7;//int T, n;//ll a[N][5], asn, lim[N][5], tot, biao[5000008];//inline void dfs(int ceil, ll cnt, ll maxx)//{ // ll sum = 0; // if(ceil == n) //{// for(int i = 1; i <= 3; ++i) // { // if(lim[ceil - 1][i] < maxx) // { // cnt += a[ceil][i]; // tot++; // biao[tot] = cnt; // cnt -= a[ceil][i]; /// } //} //} // else // { // for(int i = 1; i <= 3; ++i) // lim[ceil][i] = lim[ceil - 1][i]; // for(int i = 1; i <= 3; ++i) //{ // if(lim[ceil][i] < maxx) // { // cnt += a[ceil][i]; // lim[ceil][i]++; // if(lim[ceil][1] < maxx) // { // dfs(ceil+1, cnt, maxx); // } // if(lim[ceil][2] < maxx) //{ // dfs(ceil+1, cnt, maxx); //} //if(lim[ceil][3] < maxx) //{ // dfs(ceil+1, cnt, maxx); // } //cnt -= a[ceil][i]; // } //} //}//}//int main()//{ // freopen("club.in", "r", stdin); // freopen("club.out", "w", stdout); // ios::sync_with_stdio(0); //cin.tie(0); // cin >> T;// while(T--) // { // cin >> n; // ll maxx = n / 2; // asn = tot = 0; // memset(a, 0, sizeof(a)); // memset(biao, 0, sizeof(biao)); //memset(lim, 0, sizeof(lim)); ///for(int i = 1; i <= n; ++i) // for(int j = 1; j <= 3; ++j) // cin >> a[i][j]; // for(int i = 1; i <= 3; ++i) //{ // lim[1][i]++; //dfs(2, lim[1][i], maxx); //lim[1][i]--; // } //for(ll i = 1; i <= tot; ++i)// asn = max(asn, biao[i]); // cout << asn << "\n"; //} //return 0;//}*/```::::
- 楼梯状注释。
::::info[GX-S00458 club.cpp]```cpp sort(p3 + 1, p3 + cnt3 + 1, cmp3); // for(int i = 1; i <= cnt1; i++){ // cout << p1[i].i;// } //cout << '\n'; // for(int i = 1; i <= cnt2; i++){ // cout << p2[i].j; // }// cout << '\n'; //for(int i = 1; i <= cnt3; i++){ // cout << p3[i].k; // } // cout << '\n';// cout << ans << '\n'; while(cnt1 > n / 2){```::::
- 用斜杠划分代码区域。
::::info[GX-S00560 club.cpp]```cppvoid dfs(int level, int num){
if(level == n) { if(num > maxx && d1 <= n / 2 && d2 <= n / 2 && d3 <= n / 2) maxx = num; return; } if(d1 > n / 2) return; if(d2 > n / 2) return; if(d3 > n / 2) return; //////////////////////////////////////////////////// c1[d1] = ar[level][0]; d1++; dfs(level + 1, num + ar[level][0]); d1--; c1[d1] = 0; //////////////////////////////////////////////////// c2[d2] = ar[level][1]; d2++; dfs(level + 1, num + ar[level][1]); d2--; c2[d2] = 0; //////////////////////////////////////////////////// c3[d3] = ar[level][2]; d3++; dfs(level + 1, num + ar[level][2]); d3--; c3[d3] = 0; //////////////////////////////////////////////////// return;
}```::::
### 后话
本文基本由我一个人完成。有 $3$ 项由选手本人亲自提供。期间使用了 deepseek 生成的注释提取工具(虽然连正则都是错的),但是还是自己把所有代码都翻了一遍,所以做得很慢,对不起。
欢迎大家加入 GXOI 交流群:322611329。
如果有遗漏或者格式炸了的,私信我或者在群里提出,或者在[共享表格](https://docs.qq.com/sheet/DR0RXS2ZCU3h3S09y?tab=BB08J2)里补充。也欢迎在 J 组部分中填一填找到的有意思的东西,目前 J 组部分还是空的。
J 组不一定做得了了,已经燃尽了。