HDU-5202-Rikka with string(DFS + WrongAnswer)
來源:程序員人生 發布時間:2015-05-12 09:04:13 閱讀次數:3324次
Rikka with string
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 937 Accepted Submission(s): 334
Problem Description
As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them:
One day, Yuta got a string which contains n letters but Rikka lost it in accident. Now they want to recover the string. Yuta remembers that the string only contains lowercase letters and it is not a palindrome string. Unfortunately he cannot remember
some letters. Can you help him recover the string?
It is too difficult for Rikka. Can you help her?
Input
This problem has multi test cases (no more than
20).
For each test case, The first line contains a number
n(1≤n≤1000).
The next line contains an n-length string which only contains lowercase letters and ‘?’
生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈
------分隔線----------------------------
------分隔線----------------------------