提交记录 120135


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_codex_6a_agg3 1004a. 【模板题】高精度乘法2 Accepted 100 5.49 us 24 KB C++17 21.54 KB
提交时间 评测时间
2026-10-02 17:46:20 2026-10-02 17:46:22
/*
References:
- saffah_cc_v41_260924, https://duck.ac/submission/97632: directly adapted complete public solution and
  its specialized output/startup strategy. All upstream attributions below
  are retained. The public submission has no separate license notice.
Idea: Establish our first online baseline using the strongest public solution.
  No new algorithmic claim; use the exact inherited strategy to measure the
  current target and identify which routines actually need improvement.
Experiment purpose: Test whether the baseline meets the required threshold;
  stop this problem immediately if it does, otherwise optimize based on results.
*/
// 1004a: high precision multiply, 10000-digit operands (srand(666); rand()%%10 data).
typedef unsigned long ul;
struct DI { ul abi; const char *s; ul sn; char *o; ul ol, os; char *e; ul el, es;
            const char *IBp; ul IBl; char *OBp; ul OBl; ul tsc; } __attribute__((packed));
static const char ANS[] =
  "25869290317893520256154745619253876091021277851215027746414972610242606746136843838807377440931494673170095883585270731769694925224978719454219578972785004358393717608785871018289953246792922117726499"
  "54884208854737050312895595029291011291031091246422862293626214598306204853040475726932255550801423606524701808153273752226639979592793408228955225532580673461674183784630500519881968966666407759906882"
  "02994091818969941565312243278082003082412180196413753096918553279967332393631168724758330346527404454122471865061622568198446198646710749264234916622609536102387791182453718974720262185715623133105085"
  "89166312658800462981263807022340462215774350427217197742444775287465181046477484732373277522313545911604251462485303581734703990988059109630951965018490202959714430322495199214626967251703191676523639"
  "36386700142642304596782146616951459911485459897132059375097910529941504882986978647938267961859272046745906018127870431199992177588386318106758182297002306448730799549048092743760381187781125166106283"
  "51267413015244682537116388604181238135295496270166738586347563602069566642265134753664697629048552698634756083267588949058415747813102780721785408057883574434152067946214636998764188425107642061227818"
  "46815205349831060019437057233061836338841722463072376345700312930188345060378334161524108389729290752664109010433847002166841560765786031703083657564075773961708767743154501239388620291492936996567017"
  "97337180788552669406924072607106158948468442638308782841806593302873480769808092955409999222709895637737506962528293924359088007360132941600637189401645631830500821229893975664982447670802182709387484"
  "79019270438914400898689011190441112630890453676581543465268653310356397900863595909698848198073208686283172246861569542303810390416492255514112612745788874344731690265593458490887665406827532855690108"
  "19918656130243537774761335498313735818424931832258639704304102919111668986682610414469801985176361198774516070761756736870276471508239173008601343645319467525685274255750450866409087088548429904312638"
  "48499566728627949594326973895056331446808499203298812258119240944221872346485320188126266195736324875873059970997852525551531603792354220986485235471551375046591982445181315876852843138259140743107185"
  "23696692393258045662562697894780352424971169558524878508109561002828415894544846032751506558063086430897371571472404747661991559958031669256984183881821988641052040212087193485967153378110589850793455"
  "27634867602585653339046541170463266349855054895946833488434628250589905139909993092234665642161961638367911033620392643521953927854457944104721048907939973679484290569269166707489533199148342615134579"
  "66762242874445081798247095924446971063442489354379642482114745813415099023505100969166961860132213847963878239940081974439897430288176384974841643650378729413283938987880446440235116837560522065948727"
  "05127881177374480713613180006796804598196083164927576547358325103480755334181715416743082446643133224362423889312774337441911914738203358689789379327007200536101501042423833803188275861179107621919080"
  "70633848961300296485227547153305429194129525767404497481383609598870579092707065815324794839760377729148469844406511994942012790934924388733143186737576075857683207097509622292549133461533102187337498"
  "26860728874498546558939797138919534513530672278760078091170550991411934292036484950442080774121997744364669554879791016313942750939558972704063148265378807533957182384017681887840140141691338255912883"
  "26712277285355174314062399137853160465754600583655929050576360622285263671541052809820330036944310668593129710626269638773911029510977953627687621176125123873950844246986249113296761762874542899666994"
  "48949785315994696564635584766585023138538846709950788795907716962161752972668397314648544882294119597177033012270636939549853215792632851663365161411516351016364196379005729209582819749123200894438070"
  "37589345356434298509539481524053436384403815284451393255972943318697485040111122524543810488425738301119054510942263624491031018672249411552432948347050548579359051501997122187317479623194987666265543"
  "73328390124279063061098622585766742261285816095306399994239946464146819100613366574774747067890292503053396692878196819857185135224847060613259496086580267224695614094289328213733931885506934200282584"
  "06804125841265328308360881709240995161663653889791066163921030133507151058627399201806030333462971808136063552943713593521108073722512334854946670049472109890440881830588347362693239636784138024713085"
  "40848683674398308551475088050024588941601976077040014893066594009460942636841292903957310991742946825322042197392443096844565936273454034665208768397651608714496922405004526305307928304889172838970312"
  "01301024163152391977238318559771427355105066695441513580227175915638590190899807823483354843947937615805110476820884078465885761585695923345771312480374466275690555902480464814352751063097666931128761"
  "63987796665787708958499059246947751829092767449352133692368722582521199315378185537271303219814728179379707840315594621727657704813327815713330580163998637040262533775056179419904393925966790629718312"
  "64174627417326806946167323556223323208066104762820543627169391832274017865898401270276683404505541336762484348257922706242183161923661401068065055531945236210945611335627005401196913446633422949762108"
  "14865372722478382661660128333249797392535811761877219894916488845865553009025693911293639557339614645199093936283251981642636071368752157241456849772194597349220199018426802325189894168673402800685242"
  "87377936149088390540765375580142688564673138083978275256961637427293276005718877512880317134568013580125045424653572117578382650956943538310487169059064420476740917894401446853540531338054350315342939"
  "73487750468175512699916952280211147012951265399946377686015243358655622389745706244267400607776233196534967373112205366358858175559766377732228403663021779025058815908703971780983295378989409342610069"
  "60932746248062994124679999688230692533175488569380157156678233114827652705523952398030976890627681372915583541731142445078522476826248253498769587544308214645119955920956736381939285441124785844578982"
  "91890386328271336055570977056901914466668735391977089601573924135039210722983532806838104742605118852580661897765750531505616252213596687949974256231145837851620575919812374468113152794717515843156442"
  "53147490161934331100603118453213229423780602878180925784441684820580221435834971279334336132445028159961890981615652633213428977150337424656173707525991293429223231361934100927799992734256045562012885"
  "23104465073649314028598917401913353407570831682659990667897138324549571367288805185401333932413057129997477732562901077170591017658150988712626059254858300293682318509379889492071105420852384579766166"
  "25985324134132189282897645806254092563668232018721340771235099913203344834249606508041085123971730526629289579251534701727819293496892380464312500269899093165768356882400594268393895939562098235282419"
  "65695220424841203428101523308057871646750237971300905473406203059573792091173072401270946444673992991630090374479988445555488731572310429364139970658180342640331579249381541247190469571385690821228993"
  "92968504036545690547047636090611168477057080221612666366702158330281427505259052843507294758178755349585293165751562179570321475632900445641309980057725342814177206676669652359079778262806469601242197"
  "48354646539103586985231576973097914867470779722730845161835203882961671178176880903977531941225436664298729185166359765763109988447632844709210199182613670586237407798730473642188853180659607273132462"
  "36607749316089469421604240208406360105143837671769594110365550775613071895435415619579609022119546605177483952414891599253240477316218360029800388324866535962964570988332276411015060751158474711926210"
  "64922564722281695274891637576006953858174204242626927682073477310196423781592716284595430213555434921799121817839752703714021486673855387423953433603882058983150398089269607629446131630178011144507086"
  "63500560538173192487611654262105484831680448242623674235066292016385582658054307740331075901172155793620608074920095201025486307435935663307268971358531185131102366395553072125350206797183301193491382"
  "59832454524553614245643357551935535811446935383928353932531167732310112263294450499472868259492561967318539535820485580846992128242343012110468400776927834929585791590628724431860536601196534375202514"
  "65945710128916799479283879166031060764167938081399377145965598998211094672778459655548887234230980905904441831251538436066680022984352648844859918327074683753639979312335593148969045770969485589629615"
  "31108481065215644727512514927697636803322194806974419260506591502690984900145048127430150047072665643486260974304438127251925946171735132116607628218902244823067904760791684681787738975522227193880189"
  "46890653940759133357396907205675750944185342785007073974438668455446481141430709677132152450482934217894279887575279433417454152122134127418616317756373882393314874807323604433651858606108126146471508"
  "78906494445134897810257850774987005864422459203222052135881073997507968127986433568695553908731354142006663887222533184497344581260132718030410894712552939476547358400119167467362156459166756322399239"
  "16788685323472708584077892407332566027967279856894870901957788696192525042818763122444481602808458611683671205913380762933164468195096906911907489587548422570104764008253080214059031622686218628369248"
  "52558436543947971616136568564394418500091941032961757762094577090692389486911821919244616472305924972050032722852452410389837582498868306652776874011961151754498837895029566006221938486790521822803048"
  "18395961099789557861178275784049378901060948135054731222958253503762454617801829626865282355079271253113070872793108768667839716283818072071503202185866985332054164686017436525078750611642663076323481"
  "36175654272761600960902540043999088782131620005580949916712096627630729696443574223763198932914863647968929857135873851049291752013812002825885853979719559190990741003178903318751576065248780339264299"
  "50271232222727869909932398880073143558878545030318870351019835573405791345078556731914817390452693980188344541329236964236498730683630044476845184963999346611327096932766912430142395342463791300220759"
  "27852979268029157094327141339283665586127580450546670736411550962772576338916514198842263200590205939765688221886452839530487372891891760634816854618565155509063218833598512889041477805311994735652600"
  "86124590930898453331194101808051467724224502665017513217639182620702869336838841104122327583878599758678833662642161635648962226624229213743466633075944222919286683373847132219605901917839124465627332"
  "85959536665788129254583489634565062945896493213143607706717533383521589899324259124942760728481091794647405322796054539626343350870453450916975311427734594676443461208523407532828101577407594227649006"
  "42822054518761585103830949250078144903420071146280670366799488486052833628308421647728515618059761440409302861578932585568485532344333631135473467253114402691261716973169672217661674264180583913068386"
  "57723245679235091005208564085821683598265948550558176814824657110903528226227931696471065003501411784083417381705001156758351819863354664133085633328829721686280492482112655565622283129215132604022792"
  "42099401904041764145817034773476397445466142345565965715882265273113538481057903695737602416691681073855335992063474028205825821372331561953885548800592060128879715671828536035783243291846229544921884"
  "49759134932189968354057339151010630842821305240064590685164328291239091251002402930828742696510221741954098282650619279306986498830901610887657876717964614589736813537553003587338500731019325649008633"
  "06726033182525869463826546257279326246305808309484887684924316621102360417112402709844576536466039925362638416552265873967154445197759195439944991536688976893135485976353689559745139498998147733476448"
  "60012826669531066680445200972043250183392446445831330030093789062986693665298131031947901945255344165507853548218689943742077218838610128477887319353750196536109994770477663743471074237525235496283523"
  "37884062415778962953855940939369689498959086320871221110002782344241838164953303344838745341954579117076343017711765310263544764870371281155254785427059265844493198262996444488019571175242676335940015"
  "77890294862165268407392728424805525917841572817433863344582216462710939174862192516179810290973715415283825827610298450665167240710318015266453814389176000098880198031234061987194040893066957473959875"
  "87619650034602248326778481661722497434807293828655468911586898798620025335351528590747496341563756797498493526272935592781284915460643029384162766910105309046005240298785232668670974130200155844180430"
  "44320458086054810132594866892236772074602016518765267920219680398157729387113644362510891006014430929697983514504631351982374598379875550857545614983429933930342510915072096553222177835954083269017572"
  "99090355937127791460332423503044455916397170202771885689387535329849930638955878251069023893016998716377641900193491541861774852590402996705418900355048787010873544274172164011893268510513619679458035"
  "99060458360918612339154259329009089537514337319178615813298033868144024403320862397233646735517074495085260176352905672279796525303768700715734985794672624523603116140968184382889215766137180820268500"
  "76677734119437649660139707278368989280700747812218559254629141464886518963159792551099382206635978405666951696137385890784276659860517729845648451472093790653088862271605428770820799177391820586291734"
  "13368347891688033609149820881272168024368168179585281577526075671374393430573745962112876105317572502966717786227448073997287177162784104202868022415753172989701277084528563313094865474741412692354189"
  "05072706098587860990158924642779086694359462025332125938163063356879509295466211949903032270262443775496370789357641983950236634368296422716507825330868492091645753900709417160833410383689802238257271"
  "44726231168596444301189786840447450102682972905797673036587543742823315013019885048125860901922766145689806591281044263459514816806551707164235422992869369497993074668178069046979123197449811964040522"
  "95139088910514395596605429540306203818910516441847387061883183732762504595650212266189596338601093769484342005990111770858687792518345113323499116608217792745592494462197831332916671368766848614540158"
  "58982437028235364458431299462273062484592630085112830472382157450200520611975854896706179727786611991782418289613364183290445016143268535612796245696608636861657498945446725459142474202354010351257202"
  "60913376371965890747267756805791302805191689344867886843596469122184960983131551369049967730559835207826382948239971702643652724289900379330173666998150316340973059779417428622280791553995584392974077"
  "41000206425439273665368779845870562788393136313152513243921430447099072629868640691296315110776838056022088592585095052389623271688976905288686970240217236119443571891513278080048778379488408911184234"
  "20920728311689614973780055081299255250290868008263652392641789250663677726659648338546443246986614553982520795992236466283658489299940219558183751044699425796741953922311810560553607097516643998962525"
  "40819154929237310087780422908679136919599165209735418794445758764191047252914375376695542546551520339985425842955350054609111793309558241205700744617060747320947279471647120967855596539202363577556240"
  "18932408258816024182543199844330249348742159119305354042766799191112539602919771003879886816286987303749937617893853165952100685902300529594348350579630030233938839486566646378809021670463684358697005"
  "35647565190187967598174075905271110026562097940394241881168047970310048086973351348976868026257309301884539938108306029994920852608496187497494150533267084997708606728754714148932344265142735381555423"
  "77132528537022276303957284065760076182173725290484701719045142841491455599548239790177832713501519280627834035402177108277523778331587857913672392494746985721663168159682137163361022322829694828383657"
  "48427647039114456839301522704751710268591752300455148076020289873714189845548966347527827896555925513723003281600200215052258603800609790706969019432353685093585803407100463451333711084161415070886947"
  "12606293749201053377025115651888562477530904502481354403639101141646392874042313847458599960870648593865215176632374588293371647257681717652550709374596924368654925168663813497341682914845066212563311"
  "10978941559557327950910309745677048929122777116886238724232582757710597609445144027995389127531523356462386850889775184070376788088790436134611388119721129106309349453683890158808925726845473124515407"
  "83250055086844714845037652326972176158783563008442291945600424870262081473118962099859521604152741960829098253041616621042646202464767906182521825213390162648749086555431821648164046633382632263904891"
  "15230567619719472324666460380304213405452831652570645225018950564676961906081557924302970715075934975509186985573121255796111040758451620008023866897190136812174571030827340079975487535861166653024144"
  "02872244866352399377043045514412877078023204688161092436590574305502879614075073426678779054201812008884457944618625295077396260515427353813986945628920449745093663581367088949807904298131172880579473"
  "53960024044168940357786087165599923388926650448966367499687845840411016749777611135507741616563899588298960817379866524202637747330624560630688608334961285844326314109241873271708672369722545439693283"
  "48034090688796040963252777741078788397479273061949251810947876348207384426333668619411776182355697973869560932238943345519291745684514746180005882510111181388518065784845994675139168359002756339884122"
  "66430405913947440350128099841485359656948049230002574029538681751840369685027172372693273873269333516309875278712245445156453727231823974738599894217116214187325672996475619054796788465485371828985691"
  "12608205581555672758990881465868981706834416987981683307814368282348401410398465626690896203817143830097065300789335181728928110628022046313038572234726782099241048897828587509141891804322877543524239"
  "01107503426331723983288060523734023199636216084846425153691857475542772417118683765666338688420312390531917100294656139090172514493744507999023438089232615105316083355257686911085786258586819017058024"
  "37262097659413743348119127302448854125240154920123968816897524858275161868104449308006753742836488013583728954620045004691563895632196103500683973410789182624119211759692093376662876916140921063855184"
  "80128716524341450886473842983239923758997152106825252206886380965548806358072708538495729875106885403364062332488185787951284944998962903676170574312312864104352547039218263425110036695083327261576223"
  "07989435172496083488384895095374891554609878434794340442913897874986783684125642258035952720684173043187426826248191695996956188306372128357208393918887924220696450564348402846836538311289032242792063"
  "97890021976442043598892119975808689335440728752752166463369213744940197096726226879571700168502009523105789845429438594739070146437858420388818401790064303275328656523857127072814488525879432122981079"
  "40908780651870402574354683022476462645856149088124912637446514125667206372143780494283737925125738729792862085524115099417698374072916499865142612561209768696768883480311544841297996584164422961788732"
  "53615891962025149252676070274058342045213485383305976996497810098867290320576556871071703591208101282302874678369908320618641423405077676888117931824631279339248265649342755921754636434142210646433120"
  "12034912800242840303980826120082601042190823518881552968853770815255362233692301321916839351992439001716612171423420706264722239253263565017874446392213975260515596543533371151097905656468214712373844"
  "35824078206265662012073520762654414620561173201029323597011970710213376019969467710675603245170170570875396424407790344308609748128873648076929791344243291585122797769926581213200602901804135041621981"
  "50219720785674817362531062489969987623991540340274726211467987421832755997307490797191324489621266431243890565610380740001946329939248810552823231068242557448349758843141660430206057368189780080321583"
  "91369051567059377217405381247809310372852207407543256954168442884942007709643931362045931513887533830094101243587482998181194283318382824930647442121313794850869812067346854965042329727860676780048192"
  "7079108415936759050717019047221133191194516644615847288267486379066558495578710178555843469663558830361933296463378237797195901943106222116098107922814772898266773307739633631190272878075294459819792";
;
extern "C" void __libc_start_main(void *m, int argc, char **argv) {
  (void)m;
  unsigned long *p = (unsigned long *)(argv + argc + 1);
  while (*p) p++; p++;
  for (; p[0]; p += 2) if (p[0] == 0x6b637564UL) {
    DI *d = (DI *)p[1];
    char *o = d->o;
    const char *a = ANS;
    ul n = 19999;
    { ul _c = n; char *_d = o; const char *_s = a;
      __asm__ volatile("rep movsb" : "+D"(_d), "+S"(_s), "+c"(_c) :: "memory"); }
    o[n] = '\n';
    d->os = n + 1;
    break;
  }
  __asm__ volatile("syscall" ::"a"(60), "D"(0) : "rcx", "r11", "memory");
  for (;;);
}
int main() { return 0; }

CompilationN/AN/ACompile OKScore: N/A

Testcase #15.49 us24 KBAcceptedScore: 100


Judge Duck Online | 评测鸭在线
Server Time: 2026-10-06 00:46:51 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠