hdu 1880 魔咒词典
生活随笔
收集整理的這篇文章主要介紹了
hdu 1880 魔咒词典
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
魔咒詞典
Time Limit: 8000/5000 MS (Java/Others)????Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 9543????Accepted Submission(s): 2449
給你一部魔咒詞典。當哈利聽到一個魔咒時,你的程序必須告訴他那個魔咒的功能;當哈利需要某個功能但不知道該用什么魔咒時,你的程序要替他找到相應的魔咒。如果他要的魔咒不在詞典中,就輸出“what?”
?
Input 首先列出詞典中不超過100000條不同的魔咒詞條,每條格式為:[魔咒] 對應功能
其中“魔咒”和“對應功能”分別為長度不超過20和80的字符串,字符串中保證不包含字符“[”和“]”,且“]”和后面的字符串之間有且僅有一個空格。詞典最后一行以“@END@”結束,這一行不屬于詞典中的詞條。
詞典之后的一行包含正整數N(<=1000),隨后是N個測試用例。每個測試用例占一行,或者給出“[魔咒]”,或者給出“對應功能”。
?
Output 每個測試用例的輸出占一行,輸出魔咒對應的功能,或者功能對應的魔咒。如果魔咒不在詞典中,就輸出“what?”?
Sample Input [expelliarmus] the disarming charm [rictusempra] send a jet of silver light to hit the enemy [tarantallegra] control the movement of one's legs [serpensortia] shoot a snake out of the end of one's wand [lumos] light the wand [obliviate] the memory charm [expecto patronum] send a Patronus to the dementors [accio] the summoning charm @END@ 4 [lumos] the summoning charm [arha] take me to the sky Sample Output light the wand accio what? what?轉載于:https://www.cnblogs.com/ERKE/p/3832597.html
總結
以上是生活随笔為你收集整理的hdu 1880 魔咒词典的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 个税是怎么算得
- 下一篇: NBA 中国与蚂蚁集团达成合作,支付宝上