杭电1867 A + B for you again
生活随笔
收集整理的這篇文章主要介紹了
杭电1867 A + B for you again
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Hot~ 2014暑期多校聯合訓練——正式啟動報名~ 詳見“杭電ACM”微博~ |
A + B for you againTime Limit: 5000/1000 MS (Java/Others)????Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3811????Accepted Submission(s): 970 Problem DescriptionGenerally speaking, there are a lot of problems about strings processing. Now you encounter another such problem. If you get two strings, such as “asdf” and “sdfg”, the result of the addition between them is “asdfg”, for “sdf” is the tail substring of “asdf” and the head substring of the “sdfg” . However, the result comes as “asdfghjk”, when you have to add “asdf” and “ghjk” and guarantee the shortest string first, then the minimum lexicographic second, the same rules for other additions. InputFor each case, there are two strings (the chars selected just form ‘a’ to ‘z’) for you, and each length of theirs won’t exceed 10^5 and won’t be empty. OutputPrint the ultimate string by the book. Sample Inputasdf sdfg asdf ghjk Sample Outputasdfg asdfghjk |
轉載于:https://www.cnblogs.com/tanjianwen/p/5245430.html
總結
以上是生活随笔為你收集整理的杭电1867 A + B for you again的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【转】利用matlab生成随机数函数
- 下一篇: .NET通过RFC读取SAP数据