亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

看不懂題目的意思,只知道要把數字變成單詞,第二行輸入的是什么東西,

看不懂題目的意思,只知道要把數字變成單詞,第二行輸入的是什么東西,

C
mrs_empress 2016-11-06 23:10:14
1002. Phone NumbersTime limit: 2.0 secondMemory limit: 64 MBIn the present world you frequently meet a lot of call numbers and they are going to be longer and longer. You need to remember such a kind of numbers. One method to do it in an easy way is to assign letters to digits as shown in the following picture:1?ij????2?abc???3?def 4?gh????5?kl????6?mn 7?prs???8?tuv???9?wxy ????????0?oqzThis way every word or a group of words can be assigned a unique number, so you can remember words instead of call numbers. It is evident that it has its own charm if it is possible to find some simple relationship between the word and the person itself. So you can learn that the call number 941837296 of a chess playing friend of yours can be read as WHITEPAWN, and the call number 2855304 of your favourite teacher is read BULLDOG.Write a program to find the shortest sequence of words (i.e. one having the smallest possible number of words) which corresponds to a given number and a given list of words. The correspondence is described by the picture above.InputInput contains a series of tests. The first line of each test contains the call number, the transcription of which you have to find. The number consists of at most 100 digits. The second line contains the total number of the words in the dictionary (maximum is 50?000). Each of the remaining lines contains one word, which consists of maximally 50 small letters of the English alphabet. The total size of the input doesn't exceed 300?KB. The last line contains call number ?1.OutputEach line of output contains the shortest sequence of words which has been found by your program. The words are separated by single spaces. If there is no solution to the input data, the line contains text “No solution.”. If there are more solutions having the minimum number of words, you can choose any single one of them.Sampleinputoutput7325189087 5 it your reality real our 4294967296 5 it your reality real our -1reality?our No?solution.后面輸入的英文又是什么?為什么數字相同結果不同?
查看完整描述

1 回答

?
SupperMary

TA貢獻5條經驗 獲得超0個贊

題目之意為

由于電話號碼越來越長,難以記憶,現建立數字與單詞或者字母之間的對應關系,然后編寫程序來找出這種對應關系。

因為示例輸入輸出我沒太看明白,所以 攤手.jpg


查看完整回答
反對 回復 2017-03-10
  • 1 回答
  • 1 關注
  • 1746 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號