## CCC '04 J3 - Smile with Similes

View as PDF

Points: 3
Time limit: 2.0s
Memory limit: 64M

Problem type
##### Canadian Computing Competition: 2004 Stage 1, Junior #3

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 adjectives and nouns , and print out all possible similes. The first two lines of input will provide the values of and , in that order followed, one per line, by adjectives and nouns.

Your program may output the similes in any order.

#### Sample Input

3
2
Easy
Smart
Soft
pie
rock

#### Sample Output

Easy as pie
Easy as rock
Smart as pie
Smart as rock
Soft as pie
Soft as rock

CCC problem statements in large part from the PEG OJ

• commented on May 17, 2022, 11:23 p.m.

I love pies. don't tell me that I'm weird

• commented on May 1, 2022, 3:39 p.m.

Pies are always known for their extremely high IQ

• commented on Dec. 2, 2021, 8:00 p.m.

I do like it when rocks are soft

• commented on Dec. 26, 2017, 12:55 a.m.

How come you guys don't have all the J3 problems?

• commented on Aug. 22, 2020, 10:58 a.m.

This comment is hidden due to too much negative feedback. Show it anyway.

• commented on Dec. 26, 2017, 4:29 p.m.

Some problems are shared between junior and senior. J3 is sometimes (but not always) the same problem as S1 and is listed as S1 on this site.

• commented on May 26, 2018, 7:50 p.m.

This comment is hidden due to too much negative feedback. Show it anyway.