#TCTM15126. Smile with similes
0
Smile with similes
Smile with similes
题目描述
A simile is a combination of an adjective and noun that produces a phrase such as "Easy as pie" or "Cold as ice".比喻是形容词和名词的组合,可以产生“像馅饼一样容易”或“像冰一样冷”这样的短语。
Write a program to input n adjectives (1≤n≤5) and m nouns (1≤m≤5) provided by your contest supervisor, and print out all possible similes. The first two lines of input will provide the values of n and m, in that order followed, one per line, by n adjectives and m nouns. Your program may output the similes in any order.
编写一个程序,输入比赛主管提供的n个形容词(1≤n≤5)和m个名词(1≤m≤5),并打印出所有可能的比喻。前两行输入将按顺序提供n和m的值,每行一个,然后是n个形容词和m个名词。您的程序可以按任何顺序输出比喻。
输入格式
输入比赛主管提供的n个形容词(1≤n≤5)和m个名词(1≤m≤5),并打印出所有可能的比喻。前两行输入将按顺序提供n和m的值,每行一个,然后是n个形容词和m个名词。输出格式
按任何顺序输出比喻。3
2
Easy
Smart
Soft
pie
rock
Easy as pie
Easy as rock
Smart as pie
Smart as rock
Soft as pie
Soft as rock