Editorial for WC '18 Contest 3 J3 - R


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

We'll go row by row from top to bottom, determining and outputting each one as we go.

The first row consists of R1 #'s followed by one ..

The next R2 rows each consist of one #, followed by R2 .'s, followed by one #.

The next row is the same as the first row.

Finally, R1 rows remain. The i-th of these contains a # in column 1 and another in column i+1. In other words, it consists of one #, followed by i1 .'s, followed by one #, followed by Ri1 .'s.


Comments

There are no comments at the moment.