[NOI2009]诗人小G

Grade Open Time Friday, 19 September 2014, 10:07 am
Discount 0.8 Time Discount Friday, 26 September 2014, 10:07 am
Allow late Yes Close Time Friday, 26 September 2014, 10:07 am
Input file noi09_poet.in Output file noi09_poet.out

(为了方便,将样例贴在最前面

Input:


4

4 9 3

brysj,

hhrhl.

yqqlm,

gsycl.

4 9 2

brysj,

hhrhl.

yqqlm,

gsycl.

1 1005 6

poet

1 1004 6

poet


Output:



108

brysj,

hhrhl.

yqqlm,

gsycl.

--------------------

32

brysj, hhrhl.

yqqlm, gsycl.

--------------------

Too hard to arrange

--------------------

1000000000000000000

poet

--------------------