[BOJ 6889] Smile with Similes
View as PDF
Submit solution
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text
Points:
1
Time limit:
1.0s
Memory limit:
128M
Problem types
Allowed languages
A simile is a combination of an adjective and noun that produces a phrase such as "Easy as pie" or "Cold as ice".</p>
Write a program to input $n$ adjectives $(1 \le n \le 5)$ and $m$ nouns $(1 \le m \le 5)$, 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.
입력 형식
출력 형식
예제 입력
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
Comments