ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1002. Phone Numbers

Who can explain me sample?
Posted by T_be_GP 20 Aug 2010 18:09
7325189087
Input :
5
it
your
reality
real
our
-1

Output :
reality our
Re: Who can explain me sample?
Posted by Volodymyr K 24 May 2011 18:43
Your task is to find the minimal words sequence for the specified number. if you replace characters with numbers according to task description (also remove spaces) you'll get the specified input number string, e.g. 7325189087. if you have few solutions just write any of them

single task input:
7325189087 < the number itself
5 < words count
it << separate words
your << separate words
reality << separate words
real << separate words
our  << separate words

the program input should match pattern:
<task input 1>
<...>
<task input N>
-1 << determine end of input