[測試] test已刪文

看板Test作者 (裱高中化學題目出錯之神)時間6年前 (2019/05/14 03:44), 編輯推噓0(002)
留言2則, 1人參與, 6年前最新討論串1025/7236 (看更多)
StringAndSubstringDescriptionYouaregivenastringsandanintegerm,yourtaskistosolvetwoproblems:Findalongeststringt,sothattisasubstringofs,andappearsatleastmtimesins.Thedefinitionofsubstringisasequenceofconsecutivecharactersinastring.Forexample,s=baaaababababbababbab,m=3,thentheanswerwouldbebabab,sincethereisnoothersubstringofsislongerthanbababandappearsatleast3timesinstrings.Findalongeststringr,suchthatrisaprefixofsandasuffixofs.Inotherwords,risthebeginningofthestringsandtheendofthestrings.Tomakeitmorechallen ging,stringralsoneedtobeabletobelocatedsomewhereinsidethestrings,thatis,itisneitherbeginning,noritsend.Forexample,s=abcdabcabc,theanswerisabc,becauseitappearsatpositions0prefix,4neitherprefixnorsuffix,7suffix,whichmeetstherequirements.InputFormatTheinputcontainsseveraltestcases.Eachtestcaseconsistsofalinewithanintegermm , theminimumnumberofrepetitions,followdbyalinecontainingastrings.Allcharactersinsarelowercasecharactersfromatoz.Thelasttestcaseisdenotedbym=0andmustnotbeprocessed.OutputFormatForeachtestcase,youneedtoprinttwolinesofanswers:Forproblem1,ifthereisnosolution,outputnonewithoutthequotes;otherwise,printtwointegersinaline,separatedbyaspace.Thefirstintegerdenotesthemaximumlengthofasubstringappearingatleastmtimes;thesecondintegeristherightmostpossiblestartingpositionofsuchasubstring.Forproblem2,printthestringthatmeet stherequirements.Ifasuitablestringdoesnotexist,thenprintJustalegendwithoutthequotes. -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 112.105.152.177 ※ 文章網址: https://www.ptt.cc/bbs/Test/M.1557776690.A.B2A.html

05/14 05:15, 6年前 , 1F
http://pasted.co/79ac4f1a 推廣吃素,純文字檔可以點開
05/14 05:15, 1F

05/14 18:39, 6年前 , 2F
【台灣世界展望會˙勇士大會師500名】https://reurl.cc/ND1Q
05/14 18:39, 2F
文章代碼(AID): #1SsSaoig (Test)
討論串 (同標題文章)
完整討論串 (本文為第 1025 之 7236 篇):
測試
1
1
測試
測試
測試
測試
0
1
測試
測試
1
1
測試
1
1
測試
測試
1
3
文章代碼(AID): #1SsSaoig (Test)